It is easy to give Mail.app and Gmail something very close to synchronized inbox
and sent mail boxes. Any message sent in Mail.app will be stored in Gmail's serverside sent box, any message sent through Gmail's web interface will store a copy in your Mac's sent mail box, and any received message will also be available through the web interface or on your own computer. This is most useful because it allows access of any of your email from anywhere through Gmail's nice interface, and it allows you to download your email and keep it offline and able to be read without an internet connection.
First,
enable POP access in Gmail. Next,
set up Mail.app to use gmail's POP server
and SMTP server. (Using your ISP's SMTP server instead will not allow messages sent from Mail.app to be stored in Gmail.) Finally, add a rule in Mail.app and put it toward the very top of the priority list:
If all of the following conditions are met:
- From Contains your name
- To Does Not Contain your name
Perform the following actions:
- Move message to mailbox: Sent
- Mark as Read
- Stop evaluating rules
In Mail.app, using Gmail's SMTP server stores the sent message on Gmail's server for later viewing on gmail.com. In Gmail, sending a message leaves a copy on the gmail account which is retrieved through POP3 by Mail.app, which is routed by the mail rule to your sent box. Thus, all your sent mail is backed up on gmail's server and stored locally on your Mac.