I want to keep a local copy of my sent email using Apple Mail.
I have a gmail account. I created a local folder. How can I get a copy of sent emails to that folder?
I want to keep a local copy of my sent email using Apple Mail.
I have a gmail account. I created a local folder. How can I get a copy of sent emails to that folder?
Gemini suggested these two methods.
The short answer is yes, but with a slight catch. Apple Mail’s built-in Rules feature only automatically processes incoming emails. However, you can easily achieve exactly what you want using one of two methods: a clever workaround using standard Rules, or a seamless automation using AppleScript.
Here is how to set up both options.
Since Apple Mail rules only trigger on incoming messages, you can tell Mail to automatically blind-copy (BCC) you on every email you send. Then, a rule grabs that incoming copy and moves it to your local folder.
Sent Local Copy.any of the following conditions are met:From contains [Your Email Address]Move Message to mailbox Sent Local Copy (under the “On My Mac” section).Now, whenever you send an email, you’ll receive a hidden copy that instantly flies out of your inbox and lands straight into your local folder.
If you don’t want the extra network traffic of BCC’ing yourself, you can use macOS’s built-in Script Editor to hook into Apple Mail. This method triggers a script whenever a message is sent.
Cmd + Space and type “Script Editor”).AppleScriptusing terms from application "Mail" on perform mail action with messages theMessages for rule theRule tell application "Mail" repeat with theMessage in theMessages -- Check if the message is from you if sender of theMessage contains "your_email@example.com" then -- Duplicate the message to your local mailbox duplicate theMessage to mailbox "Sent Local Copy" of container "On My Mac" end if end repeat end tell end perform mail action with messages end application "Mail"
(Make sure to replace your_email@example.com with your actual email, and Sent Local Copy with the exact name of your local folder).
SaveSentLocal.scpt) inside the folder: ~/Library/Application Scripts/com.apple.mail/Keep in mind that folders under On My Mac are stored strictly on your computer’s hard drive. Make sure you have a backup system like Time Machine running so you don’t lose these local copies if your Mac ever takes an unexpected nap!
What’s the purpose of the copy? To have a “just in case” archive, or something else? Do you have a backup solution for your entire Mac that covers your mail folder?
Yes, just in case backup.
I have time machine backing up to a NAS.
Two things.
First, Mail stores files as .eml files on disk. If you have a backup of the folders where it stores the files, you have a “just in case” backup. You’d have to restore it manually (and carefully!), but it exists.
Second, there’s at least one app that maintains a separate data store that’s likely a better option than just a folder full of emails without any updates (moving, deleting, etc.). Credit to @tjluoma, who has mentioned Horcrux numerous times in the past. https://thehorcrux.com/
Your solutions from Gemini are still viable - but there might be better/easier options. ![]()
Thanks.
I may consider just relying on time machine.
I will check out horcrux. I like the HP reference.
I tried setting up the methods from Gemini. They created additional emails in my inbox and trash.
Lee
If you go to takeout.google.com you can request a copy of all your email (or all of your data). Your mail will be exported as an MBOX file which can be imported into Apple Mail. Or just saved as a backup.
If you wish, you can request this be done every month for one year. And you will receive an email when each download is ready.
I use imap-backup to store a local copy of all my mail (so also the Sent folder):
I use Fastmail myself, but according to the documentation this tool can work with Gmail as well (via an extra OAuth2 tool).