This question already has an answer here:

I'm new to GNU/Linux and I want to send e-mail to other users on my computer (specifically from root to david). I've searched on google and I have tried the following:

    # mail david
      Subject: some subject.
      The message ...

But when I login on the system as david and type mail it says no mail for david.

Does mail work too for sending an email to a G-mail account?

marked as duplicate by Gilles, slm, Renan, jasonwryan, terdon Sep 21 '13 at 5:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You can send mail to your gmail account using:

$ mail -s "Subject" address@gmail.com
Body Text

If it doesn't work, then check if mail is installed.

$ which mail

If this command doesn't give anything, then mail isn't installed. To install:

$ sudo apt-get install mailutils
# yum install mailutils

etc ...

From: http://www.simplehelp.net/2008/12/01/how-to-send-email-from-the-linux-command-line/

  • 1
    Thanks for the info @Kartik, but it was not enough. Finally I had to reconfigure the MTA with dpkg-reconfigure exim4-config and now it works perfectly. – David Martínez Sep 20 '13 at 19:25

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