bzr-imapclient

James Henstridge james at jamesh.id.au
Fri Jan 16 03:53:11 GMT 2009


I was reading Paul Hummer's recent blog post about using "bzr send",
which included a link to http://bazaar-vcs.org/BzrSendWithGmail about
setting it up to work with gmail.

Neither of the solutions there appealed to me, since the sent message
doesn't end up in my sent mail folder.  While I couldn't think of a
way to pop up GMail's compose screen with a file already attached, I
realised that it would be possible to add an item to my drafts folder
via IMAP.  That message could then easily be edited and sent.

The result is a quick and dirty imapclient plugin that can be installed with:

    bzr branch lp:~jamesh/+junk/bzr-imapclient ~/.bazaar/plugins/imapclient

This should be usable for anyone using an unsupported mail client and
a drafts folder stored on an IMAP server.  To configure it
specifically for GMail, you'll need to enable IMAP for your account
and then add the following to your bazaar.conf file:

  mail_client = imaps
  imap_server = imap.gmail.com
  imap_mailbox = [Gmail]/Drafts
  imap_username = username at gmail.com

You'll need to adjust imap_username to the appropriate address (non
@gmail.com hosted accounts should work too), and if you're using a
non-english locale you might need to change the mailbox name.

Once that's configured, any command using the bzrlib MailClient API
(such as "bzr send") will dump a message in your drafts folder ready
to be edited and sent.

James.



More information about the bazaar mailing list