Select the Sent
folder for Gmail in the Mail.app sidebar (might be under a [Gmail]
heading in Mail depending on how you set it up) then go to the Mailbox
menu in the menu bar and look down near the bottom for the Use This Mailbox For
menu.
Choose Sent
in there and that should make the Gmail-based Sent folder the default place for Mail.app to save outgoing mail. It will also appear to move that [Gmail]/Sent
folder out of the Gmail section and up to the top-most Mailboxes
section below Inbox
, etc.
After you do this you may notice you now have a section in the Mail sidebar for On My Mac
folders, and a Sent
folder in there. This is the folder that previously was containing all messages sent via Gmail but stored locally. Feel free to copy all the messages out of there and into the new default Sent
folder (which will copy them all up to the Gmail server).
PS - This process works for Trash
as well, so you can map the Gmail Trash to be used by Mail.app. You can also do it for Drafts
but I've seen some weird behaviour where Gmail/Mail.app doesn't delete drafts after sending a message and you get a ton of them stacking up in Drafts, which is why I usually leave Drafts as a local-only folder.