Quickly Email A Picture On iOS Using Pythonista
In my review of Pythonista yesterday, I didn't include any scripts to send email messages. Email is, however, a huge part of my iOS workflow, as I often send screenshots back and forth with my teammates about upcoming site features or new apps I'm testing. Fortunately, Pythonista developer Ole Zorn shared today a script that uses
smtplib to quickly send an image via email. His script is available on GitHub Gists here.
I have modified it slightly to import my login data using
keychain and send an image that's been previously copied to the clipboard. In this way, I can take a screenshot/photo, open the Photos app, copy it, and send it via email in seconds, at full-size. You can save the script as shortcut on your Home screen and have one-tap access to it, or, even better, you can copy images from Safari without saving them first to the Camera Roll (though, in my tests, this hasn't always worked reliably). My modification also uses
console.input_alert to let you enter a different email address and Subject every time, and it plays a sound effect when an email is sent. Right now, the ImageMail script works with Gmail, but it could be easily modified to work for other email services.
In a future version of Pythonista, I think it'd be neat to have a dedicated Address Book module to return contact fields such as email addresses or Twitter usernames; Ole suggests Reminders and Calendar integration might be handy as well. I think Pythonista has a very bright future, so we'll see. In the meantime, you can download my modified version of the ImageMail script here.
Pythonista is available at $4.99 on the App Store.