Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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?

share|improve this question

4 Answers 4

up vote 20 down vote accepted

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

share|improve this answer
2  
LOL. A down vote. Disgruntled PINE user maybe? Sucks to be stuck in the dark ages of terminal mail programs. :) –  Ian C. Apr 1 '12 at 3:31

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='jdoe@example.com'
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

share|improve this answer

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

share|improve this answer

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

share|improve this answer
7  
Tip: You can link to the Mac OS X man pages through developer.apple.com, the Mac's version of a command-line program doesn't always work exactly the same way as the corresponding Linux one; here's the man page for mail: developer.apple.com/library/mac/#documentation/Darwin/Reference/… –  Rinzwind Mar 20 '12 at 21:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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