Mutt is a command-line based mail reader.  I've heard that even top execs at Google have used it as their primary mail reading tool.  These are my notes for setting it up on OpenBSD 5.9 for use with gmail.  I've heard it can be used in conjunction with davmail(??) to deal with Microsoft Exchange.
sources here:
https://dev.mutt.org/trac/wiki/UseCases/Gmail 
https://www.linux.com/blog/setup-mutt-gmail-centos-and-ubuntu 
in order to use the trash function with Gmail, you have to apply this patch
http://cedricduval.free.fr/mutt/patches/#trash 
how to do it:
http://cedricduval.free.fr/mutt/patches/#patch
install mutt and nano (for ease of command-line text editing).
sudo apt-get install mutt nano
create the mutt config file and open it.
touch ~/.mutt/muttrc
nano ~/.mutt/muttrc
The contents of the config file can vary, based on what you actually want.  Mutt doesn't by default understand spaces in mailbox/folder names, so you have to change that setting in the muttrc file.

Here is a link to my own muttrc file on Github.