44

My C++ professor has had us use Terminal for editing code. Is there an app or program that will allow me to send and receive email via Terminal, so I can stay in one window?

5 Answers 5

46

This sure takes me back to my university days...

Mutt has still got to be one of the best terminal-based mail clients out there. It's been around longer than I'd like to admit. It's available as a homebrew package:

> brew info mutt
mutt 1.5.21
http://www.mutt.org/
Depends on: tokyo-cabinet
Not installed
http://github.com/mxcl/homebrew/commits/master/Library/Formula/mutt.rb

Overall you'll get a much better experience using something like Mutt than you will with something like mail because it supports IMAP, POP3 and SMTP -- you don't have to learn sendmail or anything like that to get it to work with your accounts.

You can even use Mutt with Gmail if that's your bag. See this article for details on setting up Mutt to work with Gmail.

Pretty colours...

Mutt in action

1
  • 16
    LOL. A down vote. Disgruntled PINE user maybe? Sucks to be stuck in the dark ages of terminal mail programs. :)
    – Ian C.
    Apr 1, 2012 at 3:31
13

For a full fledged terminal based email client that supports most email protocols, I'd suggest using mutt. You can download mutt from here, if you'd like to build from source. This webpage gives you directions on how to install on OS X.

If you use homebrew, then installing is as simple as brew install mutt (and similarly for fink and macports).

Here are a few basic steps to get your .muttrc configured:

#Set account info
set spoolfile=/var/spool/mail/jdoe #if using IMAP, use imaps://example.com/INBOX
set folder="$HOME/mail"            #if using IMAP, use imaps://example.com/
set imap_user=jdoe
set from='[email protected]'
set realname='John Doe'
set signature="~/.signature"

#Mailbox behaviour
set mail_check=15                  #check for new mail
set timeout=30
set include=yes                    #quote when replying

#Compose/reply/etc...
set editor=vim                     #change to your favourite command line editor  
ignore headers *
unignore headers from to subject date cc
hdr_order from to cc subject date
set fast_reply                     #don't ask for to, subject when replying
unset metoo                        #remove myself from replies
set sort=date-received

You can customize these further as you wish, and there are also some useful questions in the mutt tag on Unix.SE and StackOverflow

1
  • 2
    After installing mutt via homebrew, I could view my local email (/var/mail/admin), but couldn't delete anything -- mutt kept saying the mailbox was "read-only." Turns out I had to add myself to the mail group to be able to delete: dseditgroup -o edit -u [username] -p -a [username] -t user mail. Don't know if that happens when installing via other methods, but it sounds like a Darwin thing, so it probably does. Sep 3, 2016 at 4:46
13

Yes and here is another one called the Alpine Messaging System a.k.a Alpine. Available from the University of Washington

Alpine is a free software email client developed at the University of Washington. Alpine 1.0 was publicly released on December 20, 2007. The name "Alpine" stands for Alternatively Licensed Program for Internet News and Email. Alpine is a rewrite of the Pine Message System that adds support for Unicode and other features. Alpine is meant to be suitable for both inexperienced email users and the most demanding of power users. Alpine is developed at the University of Washington, as was Pine before it. Alpine can be learned by exploration and the use of context-sensitive help. The user interface can be customized.

If you install MacPorts you can install alpine by doing the following:

sudo port install alpine

Alpine 2.0 in action

1
  • 3
    or if you use homebrew "brew install alpine"
    – vr_driver
    Apr 13, 2017 at 11:49
8

Take a look at the mail command. It will let you send and receive email in the Terminal.

3
1

Check the new reincarnation of the mutt - https://github.com/neomutt/neomutt

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .