Hacking Integration with Third Party Applications
In practice, the extended mailto:
URI scheme should allow MailMate to be integrated with applications which need to send messages with attachments. Unfortunately this often requires the developers of the applications to add scripts for MailMate. Some example scripts are included with MailMate and they can be enabled as described below using the Terminal (assuming all applications are in /Applications
). Note that in some cases updating the applications involved or moving MailMate is going to break the symbolic links created.
Alfred 2
ln -s /Applications/MailMate.app/Contents/SharedSupport/Other/Alfred\ 2/MailMate.scpt ~/Library/Application\ Support/Alfred\ 2/Plugins/Email/
iCal
mv /Applications/iCal.app/Contents/Resources/Scripts/Mail.scpt /Applications/iCal.app/Contents/Resources/Scripts/MailBackup.scpt
ln -s /Applications/MailMate.app/Contents/SharedSupport/Other/iCal/Mail.scpt /Applications/iCal.app/Contents/Resources/Scripts/
Note: The above does not work on Mountain Lion or later versions of macOS since Apple no longer uses the Mail.scpt
file. It is unknown whether or not a workaround exists.
BusyCal
mv /Applications/BusyCal.app/Contents/Resources/Scripts/MailAttachmentScript.scpt /Applications/BusyCal.app/Contents/Resources/Scripts/MailAttachmentScriptBackup.scpt
ln -s /Applications/MailMate.app/Contents/SharedSupport/Other/BusyCal/MailAttachmentScript.scpt /Applications/BusyCal.app/Contents/Resources/Scripts/
Note: The above only works for BusyCal 1.6.
LaunchBar
An example with instructions is available here.
The mlmt:
URI scheme
In addition to the mailto:
scheme MailMate has its own URI scheme named mlmt
. This is likely to be extended over time, but for now it can be used to trigger toolbar-like searches. The following is an example of using it from the Terminal window:
mlmt:quicksearch?string=s%20mlmt
This searches subject lines for the value mlmt
. and +
are reserved characters.
In general, =
and &
are reserved characters in the query part of the URI since they are used to separate key/value parameters. For convenience, the +
is also a reserved character since it's replaced with the space character. If you need to use any of these reserved characters then they must be percent encoded.
AppleScript
AppleScript support is somewhat limited. You can use the mailto:
scheme via AppleScript as described further above, but you can also do anything you can do with custom key bindings. It's done like this:
tell application "MailMate" to perform { "toggleFlag:" }
Note that this can also be used to trigger any bundle command available in MailMate:
tell application "MailMate" to perform { "performBundleItemWithUUID:", "<UUID from bundle command>" }