{ 18 comments… read them below or add one }

1 Ahmad March 3, 2008 at 10:37 am

Thank you, I tried that command and it warked so fin.


2 syed nusrath mateen May 28, 2008 at 1:00 pm

I am not able to send mail using mail utility,
I used

mail -s “Subject” somewhere@domain.com

the moment I am sending mail, its getting bounced to delively failed list. I have tried several attempts, it not working. Do I have to configure some server like pop3 before I go ahead and send mail ?

Please help in this regard.

Syed Mateen


3 syed nusrath mateen May 28, 2008 at 1:32 pm


How to configure MTA/mail server ?
Please clarify ?

Syed Mateen.


4 Mahantesh December 10, 2008 at 12:26 pm

Hi ,
I tried ,it worked .

How to attach the files ..?

Thanks and Regards


5 anil February 19, 2009 at 3:31 am

use mutt client with -a option to send mail with attachement

e.g mutt -a -s mailid@domainname.com


6 Iceman May 5, 2009 at 11:04 pm

Or you could use:
uuencode FILENAME FILENAMEATTACH | mailx user@domain.com

FILENAME is the original filename
FINENAMEATTACH is the “destination” attachment filename


7 Brahim May 13, 2009 at 12:43 pm

I used the mail command to send a message to my mailbox as a test and on the console it seems working but when i check my mailbox i see no incoming message.
Should i configure something so the command works properly?
Thanks in anticipation.


8 Renato July 3, 2009 at 5:27 pm

Hello. Shomeone could help me please, i tried to use the mail command but it does not work
What must I do ?

renato@‘s password:
[renato@erycia2 ~]$ mail -s ‘hi’ rhernand@erycia.com
Null message body; hope that’s ok
[renato@erycia2 ~]$ can not chdir(/var/spool/clientmqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.


9 fsckr July 28, 2009 at 6:26 pm

In case anyone needs to troubleshoot the interactive command line mail process you can use:
mail -v -s “Hello Recipient”
Here is my full message

The -v is verbose and it outputs the full details of the transaction between the sending and receiving servers.

@Renato, it seems that your user doesn’t have the correct permissions to access the mail queue. Ask your sysadmin to add you to the group of users that is allowed to send email.


10 harish February 3, 2010 at 1:17 pm

i have used this mail option and its working

i tries to reply to that from my mail box.. can some one assist me in replying the mail recieved from the linux box.

Thanking you in advance


11 matthew March 3, 2010 at 3:31 pm

How do zou attach something to a letter using the mail program?


12 Iceman March 3, 2010 at 9:38 pm

Have you read my previous message?
Read and you will know it…


13 1000hz April 13, 2010 at 1:57 pm

I am a freshman in Linux,I am going to work hard on it.:-)


14 sathya April 19, 2011 at 10:30 am

when i use mail command its not working,I have made canges in the sendmail.cf ,sendmail.mc,resolve.conf,and hosts file too and i have restarted the service.but its not sending mail if i logged into the user ex :autobuild@hostname.domain.com and if i give the mail command its not hittting the id.but its working fr SMTP protocol,connecting it with relay server.then mail from:autobuild@hostname.domain.com RCPT TO:id,it reaches the id.can anyone help me with this process of sending mail using mail command.OS is redhat 5.4


15 Vinay May 9, 2012 at 4:50 am

Cool .. It works. Thanks


16 Bardibul June 1, 2012 at 1:26 pm

Bonjour à tous!

Je me suis essayé à envoyer un mail avec la commande “mail xxx.xxx@gmail.com -s test”
j’ai bien rempli la ligne Cc: puis Subject:
J’ai ensuite de l’espace pour écrire mon mail mais je n’arrive pas à l’envoyer. Je m’explique, la commande “.” ne me permet pas de retourner sur la console.
Quelqu’un pourrait m’aider? Merci!



17 BrianBlaze November 27, 2012 at 4:17 pm

How, or is it possible to send mail with the mail command to a group instead of a user? I have been looking it up and can’t find anything leading me to believe that there is no way :(


18 Ian September 14, 2013 at 1:01 pm

Hi! How to send an email to all the users from my computer, using a makefile?


Leave a Comment

Tagged as: , , , , , , , , , ,

Previous Faq:

Next Faq: