How do I stop Apple Mail from opening because of iCal appointments?

I use only webbased Gmail for mail, but Mail.app keeps popping up as a result from iCal-appointments that have a e-mail reminder setting. I also get these reminders from Gmail anyway and I would like to disable the Mail.app program altogether.

I'm kind of fed up of doing "forcequit Mail.app" from Alfred several times a day. How can I solve this? Is there some kind of hook like "When Mail.app launches, kill it"? Mail.app cannot be removed from OSX.


Solution 1:

There's really only one way to kill Mail.app (as per my comment on waiwai's answer). Open Terminal.app from Applications/Utilities and enter:

sudo chmod 000 /Applications/Mail.app/Contents/MacOS/Mail

This will prompt you for your administrator password.

To reverse this, enter:

sudo chmod 755 /Applications/Mail.app/Contents/MacOS/Mail

I originally thought iCal was using the Launch Services database to open Mail, but in order to get the communication working, it relies upon AppleScript instead. You can find the script here:

/Applications/iCal.app/Contents/Resources/Mail.applescript

Unfortunately, it says:

… changes to this file will not be reflected in iCal behavior unless manually recompiled.

Thus you can't just delete or move away this file. You won't see any difference.

Solution 2:

For those with Mountain Lion, you can try this: http://www.quora.com/OS-X-10-8-Mountain-Lion/Is-there-a-way-to-completely-disable-OS-X-Mail-app-to-fire-up-and-send-Calendar-notifications

In Calendar.app, click Calendars to show your calendars in the left sidebar. Then right-click the calendar in question, choose Get Info, then click Ignore alerts. This way you'll continue to receive your Google Calendar email alerts, but not the additional OS X Calendar alerts.

Solution 3:

I renamed /Applications/Mail.app to /Applications/Mail.disabled using the following command in Terminal:

sudo mv /Applications/Mail.app /Applications/Mail.disabled