I have always liked
notmuch. I used it briefly for a period at work some time ago, because we were forced to use OWA and search was very insufficent for me (and Thunderbird didn't help much either). It worke beautifully.
But these days one of my crazy projects is writing my own email client (I'd like to have multiple accounts, a terminal interface, and Markdown composition).
notmuch
has kinda of a CLI API, where you can run it and make it spew JSON... which really makes implementing a lot of parts of a mail client... a breeze. I've always loathed dealing with emails, but so far it's working pretty well- I have implemented a basic functionality (checking for new email, reading your inbox) in very few hours.
Also, the Python's standard library
cmd is "bad", but charming. It's kinda of a good example of the batteries included; it's what
pdb
uses (I think), so they expose it. But it's quite rudimentary and likely it's never going to improve...
(The main idea behind the client is that it will invoke
$EDITOR
to compose emails, and then it will convert Markdown- or something similar to Markdown- into both a properly wrapped plain text part, and a pretty HTML part. Writing emails only in plain text sucks for many clients, while I understand many desire to receive text-only email wrapped at 80 characters. Also, writing in Markdown-like formats is great.)