Problem: Unified clients (Thunderbird, claws-mail, so on and so forth) are clumsy to setup, imposible to script, have poor addressbook systems, and send mail weirdly. Also, they don't use my text editor of choice (vim).

The solution: Use fetchmail to get email. ... And that's where I'm stuck. I want to:

  • Read email, including HTML email, with formatting, see and save attachments... I prefer not using X, but I understand I'll need to for this part. Also included in this, probably, is seeing a list of emails, but that can be a separate tool that uses this one for actually reading the emails.
  • Compose email, preferably with Vim or something similar. I need to be able to: Attach documents, hopefully also insert them.
  • Send email, hopefully having some sort of addressbook, aliasing, something of the sort.

I'd like to do as much of this in a scriptable, or at least CLI, manner as possible. Just a personal preference for being able to use environments over SSH, and being able to offload, say, sending a message at the same time every day, on to a scheduler like Cron.

  • Do you need to just read HTML email, or write it? I've found that it made a lot of difference, it was the killer feature that made me abandon Mutt for corporate email. Jun 13, 2014 at 9:59

2 Answers 2


Mutt is a very good terminal-based email client, which you can setup to use Vim as the default editor. It's got an address book and the features you want. I've used it for Gmail, and now Fastmail with various aliases.

Link: http://www.mutt.org/

It should be in the repos for most distros.

You can see and save any attachment that will display in a terminal (so you may have a little trouble with PDFs and images). Essentially it's a fully-fledged email program (like Thunderbird et al) but just terminal-based. It renders HTML pretty much similar to text-based browsers like Lynx. You can also script it (like using sendmail but with IMAP, etc.) - I do for sending emails from our server so the emails don't end up in spam, and schedule it to a decent time of day.


Easy - learn some python - the included libraries give you SMTP, POP3 & IMAP4 plus decoders for a lot of formats - throw in wxPython for any GUI needed and you are away. All of it can be developed with and called from VIM.

Some examples of sending mail with python, here .

  • Now I need to find the time to develop Python. But it's an option, thanks! Apr 14, 2014 at 23:03
  • 1
    You will be amazed how quick it is - take a look at docs.python.org/2/library/email-examples.html for examples. Apr 14, 2014 at 23:06
  • And listing emails? Could I have an ncurses-style display of my emails? Apr 14, 2014 at 23:34
  • I'm sure you could. Apr 14, 2014 at 23:39
  • 2
    You could even use python to write a vim plug-in to do some tasks with-in vim. (This answer at first seemed bad, but It has really grown on me having read the question) Jun 13, 2014 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.