Jim Hawkridge

GMail Command Line Image Sender

sendgmail is a small python script that can be invoked from the linux shell to create a new e-mail, with attachments if appropriate, within GMail. It was originally written to work with the Kipi-Plugins send e-mail plugin to allow sending images from within Digikam, KPhotoAlbum etc. The script is able to create an e-mail from the command line with your specified subject, to, body and attachments and then invoke the GMail interface to allow you to edit and send your e-mail.

The script accepts arguments in the same format as Mozilla Thunderbird and can therefore be used as a helper by any program that is able to invoke Thunderbird to send mail.

Installation / Configuration

Download the script and copy it somewhere in your path. If you want to use it with Kipi-Plugins you will need to rename it to thunderbird and copy it to /usr/bin.

Near the top of the script modify the username, password and browser variables to the proper settings for your GMail account and browser.

IMAP needs to be turned on in GMail for the script to work.

For use within Kipi-Plugins - set the mail program setting within Kipi to Thunderbird.

April 2011

© James Hawkridge 1999-2018