Questions tagged [mail-command]

The mail, Mail and mailx command line utilities

Filter by
Sorted by
Tagged with
66
votes
8answers
168k views

How do I send HTML email using linux 'mail' command?

mail -s "subject" xxxxx@gmail.com <test.html works, but only for plain text email. What is the correct way to send HTML email using the Linux command mail?
99
votes
4answers
150k views

What is “mail”, and how is it navigated?

The program is located in /usr/bin/mail. Upon execution, Version 8.1.2 01/15/2001 is shown. Entering list produces: Commands are: next, alias, print, type, Type, Print, visual, top, touch, preserve,...
2
votes
1answer
3k views

Trying to send multiple text attachments via mail message

Running this script on: "Red Had Enterprise Linux Server release 5.11 (Tikanga)" Mail is: version 8.1 6/6/93 (appears quite old). Have tried various things and cannot seem to get this to work.. ...
3
votes
2answers
6k views

Mail vs. mail what is the difference

What is this business about mail and Mail? [On a CentOS box] Why mail does not work but won't return an error either while Mail works fine with the exact same syntax? Mail is basically a link to mail,...
0
votes
1answer
408 views

-c and -b options not working in mailx in ubuntu

I was trying to send a mail from the shell script using the command mailx -s "TEST MAIL" -c "user_name ..." user<message.txt but it generates an error as unrecognized option -c ,the same happens ...
3
votes
2answers
19k views

Mail command to send attachements

I tried the below command uuencode data.txt | mailx –s “Test Mail” “mrp@xyz.com” But I get the below error ksh: uuencode: not found. Null Message body; hope that' ok which clearly tell that ...
7
votes
2answers
11k views

How can I bcc with mailx?

I'm trying to send unix mail (heirloom-mailx) via bcc. $ mail -V 12.5 6/20/10 My MTA is exim, which sends via Gmail SMTP. I can execute the following: echo -e "body" | mail -s 'subject' -b hidden1@...
4
votes
1answer
3k views

How can I forward local *nix mail to an external account while keeping the local copy?

On my Raspbian server, I wish to have local *nix mail delivered locally, as well as to an external address. /home/pi/.forward contains pi,foo@bar.com. I've run sudo dpkg-reconfigure exim4-config with ...
3
votes
1answer
3k views

Block local (unix) users from sending mail

Is there a way to block a local/unix user (or a list of local users) from sending mails via mail command (or maybe even in postfix, which is the MTA I have).
3
votes
1answer
5k views

Maildir and mailutils?

I want to use the mailutils app on a install of Ubuntu 12.04.3 LTS with a Maildir format, but every time I run the mail command, the system looks in /var/mail/user, instead of the Maildir directory in ...