MoreNotesToSelf

Technology, Finance, and Life

  • RSS Articles I’ve Read…

    • An error has occurred; the feed is probably down. Try again later.

Posts Tagged ‘mac’

Sending Gmail with Automator and Python

Posted by DK on June 13, 2009

I wanted to automate some reminder emails I send out every week (because I always forget to send them), and thought I’d give Automator a try. The experience wasn’t that great. It launches OS X’s Mail application and, for whatever reason, doesn’t send anything. The message just sits in the Outbox. I think it’s a known bug in Automator, but it was sort of a letdown for something as simple as auto-sending email.

So instead, I adapted a short python script that sends email via the smtplib and email modules, and used Automator to run the script via an iCal plug-in (File>Save As Plugin). Creating a plugin creates an Automator calendar in iCal where your scheduled script resides. All you have to do is set the timing. I know the command-line folks probably use cron to schedule scripts like this, but I like seeing the scheduled script on my calendar. I also like the script approach because I don’t have to launch any other applications (e.g., Mail). The script also works for those of you using google apps (just use your google apps email address).

Mirror at NotesToSelf

Posted in Python, Tech | Tagged: , , | 1 Comment »