4

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 ...
      ^D
      Cc:

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?

1 Answers1

1

You can send mail to your gmail account using:

$ mail -s "Subject" address@gmail.com
Body Text
^D
Cc:^D

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
 OR
# yum install mailutils

etc ...

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

Kartik
  • 2,004
  • 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