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
smtpmail-starttls-credentials '(("smtp.gmail.com" "587" nil nil))
smtpmail-auth-credentials (expand-file-name "~/.authinfo")
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"
(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@example.com password NotsoiNcreDiblePassword
The second one for retrieving mails:
machine imap.gmail.com secret port 993 login firstname.lastname@example.org password NotsoiNcreDiblePassword