This should at least, get you started:
but compose and send email in emacs. Since python can send mail from the command line, I suspect this would not be too difficult for emacs.
This is what I have in my init file for composing mail, and send them using gmail, gnutsl should be installed in your OS:
;; send mail
(setq
send-mail-function 'smtpmail-send-it
message-send-mail-function 'smtpmail-send-it
user-mail-address "[email protected]"
smtpmail-starttls-credentials '(("smtp.gmail.com" "587" nil nil))
smtpmail-auth-credentials (expand-file-name "~/.authinfo")
smtpmail-default-smtp-server "smtp.gmail.com"
smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587
smtpmail-debug-info t
starttls-extra-arguments nil
starttls-gnutls-program "/usr/bin/gnutls-cli"
starttls-extra-arguments nil
starttls-use-gnutls t
)
Next step: if possible I'd still like to be able to sync with an imap server to pull off the last ~100 emails so I can compose responses in emacs. This wouldn't require folder management, but some amount of syncing, though I don't need to keep the messages locally available to emacs after the session
You should configure your mailbox and enable IMAP, you'll be able to manage your mails from many devices. This is my config, for reading mails from gmail using emacs & gnus:
;read mail w/ gnus
(setq gnus-select-method '(nnimap "gmail"
(nnimap-address "imap.gmail.com")
(nnimap-server-port 993)
(nnimap-stream ssl)))
(setq mm-discouraged-alternatives '("text/html" "text/richtext"))
Would it still require offlineimap?
I've never used offlineimap, but you should if you want to manage your mails when offline, then, as soon as you're online, the sync will occur between your computer and the server
The ~/.authinfo file will be used to store your credentials, and it will have at least two lines, the first line for sending mails:
machine smtp.gmail.com port 587 login [email protected] password NotsoiNcreDiblePassword
The second one for retrieving mails:
machine imap.gmail.com secret port 993 login [email protected] password NotsoiNcreDiblePassword
elisp
along the way. However, it is very rewarding once you get it to do exactly what you want it to do. I use Wanderlust, and am still tweaking it's behavior from time to time -- it's been a year already and tweaking / customizing Emacs has been a daily obsession of mine.