I figured out a tricky way to do it. I'm going to make a couple assumptions: you are using IMAP and know your way around the Finder and AppleScript. I think it might work for POP mail too, although I'm not using POP mail so I'm not sure of the folder structure
Word of warning: this will trigger every time you send an email with Apple Mail. I presume this doesn't matter since you only use it for sending iCal alerts.
- Look in your ~/Library/Mail folder for your account folder. Will be labeled IMAP-login@mailserver
- There should be a folder named INBOX in there. Or if you're using gmail, it might be labelled [Gmail]. It all depends how IMAP mail is configured. In that folder you should have a Sent folder. Mine was named
Sent.imapmbox. Maybe it's Sent Mail.imapmbox for gmail
- Inside that folder there should be a
Messages folder. We want to attach a folder action to that folder
- Right click the
Messages folder, and find Folder Actions Setup in the Services menu. (Might differ if you're not using OS X 10.6 Snow Leopard.)
- Attach a script to that folder. Use the one named
add - new item alert.scpt for now.
- Select the script in the right pane. Click the
Edit Script button.
Replace the script contents with the following:
on adding folder items to this_folder after receiving added_items
try
tell application "Mail" to quit
end try
end adding folder items to
- Save the script as
quit - apple mail.scrpt or whatever.
Now whenever an email is sent with that account and the sent mail moved to this folder, this script will activate and quit the Mail application! I tested this and it worked with my computer.
Alternatively, you could use MailActOn to set up and Outgoing mail rule that runs a script. (Mail only supports incoming mail scripts). That costs money though. I suppose if you cc: a mail account configured in Apple Mail you could set up an incoming mail ruleā¦