Automator, a powerful scripting workflow tool added to Mac OS X with Tiger (10.4) allows you to create your own context menus for many things. Today I’m going to demonstrate how easy it is to make a workflow for sending selected files to a new mail message.
There are a few good books on Automator, but unfortunately the best one hasn’t been updated since 10.6.
Update from Ben Waldie:
http://www.automatedworkflows.com/tips/
http://www.macworld.com/author/Ben-Waldie/
http://www.tuaw.com/editor/ben-waldie
http://peachpit.com/benwaldie
These are links he’s provided to make your learning even easier. Great guy - if you need consulting help, please use his company!
Obviously, Google is a great place for tips and tricks with Automator too.
Steps:
Launch Automator
Choose Service
Where you see Service receives selected … in … make the selections as shown below:
Add New Mail Message to the Workflow
You can find this by clicking Mail under Library and navigating the list or simply by typing New Mail Message in the Name search box.
To add the New Mail Message Action, drag it from the list into the open space. You should see something like the image below.
For my purposes, I chose a specific account to mail from, plus added a little text that says:
This email contains attached files. These files are confidential and intended solely for the use of the individual(s) or entity to whom they are addressed. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.
Unfortunately, I found that the font did not stay set right when I used this workflow. I hope to resolve that and update this blog post in the future.
Save the Service with an easy name like Attach to New Mail Message
To do this, simply go to the File menu and choose Save or hit CMD + S.
Note: you will not get a folder option for where to save your new Service. This is because Services created in Automator default to the home directory -> Library -> Services folder.
Test Service on Menu
To use this new Service that you just created, simply go to any file or folder and right-click, select Services then Attach to New Mail Message:
You should see something like this:
BOOM! You just wrote a Service and it works! Imagine the possibilities! Mac OS X is a great platform for many reasons, but the ability to automate tasks is often overlooked or completely unknown!
Enjoy!
More updates:
- Dragging a file or group of files to the Mail icon on the dock will create a new message with the file(s) as attachment(s).
- IF you have the Share button on your Finder toolbar, you can use that to send a file by email.
Another low-cost resource for AppleScript help is Alexander Woodall and he makes great software for automation such as AppleScriptObjC Explorer and even offers free utilities like the ones found here.
MacBook Pro Models on Amazon