LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mail command works on one server but not on other (https://www.linuxquestions.org/questions/linux-newbie-8/mail-command-works-on-one-server-but-not-on-other-661957/)

Swapna173 08-11-2008 06:08 AM

Mail command works on one server but not on other
 
Hi Guys,

mail command to attach a file works on one linux server machine. but the same command does not work on the other. May i know what can be the problem.

If any server settings to be done. what can be those.

billymayday 08-11-2008 06:13 AM

Do you think it might be worth giving the exact commands, plus distro, error message, log output, etc?

Swapna173 08-11-2008 11:23 PM

The command is as follows:


cat mailbody.txt | mail -s <<subject>> -a <<filetoattach>> <<emailid>>

It gives following Message:
mail: invalid option -- a
Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...
[- sendmail-options ...]
mail [-iInNv] -f [name]
mail [-iInNv] [-u user]

The server details are :
Linux kalam.in.vistaar.com 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

Mr. C. 08-11-2008 11:26 PM

The mail command does not have the -a option. I believe this is mutt or nail. With mail/mailx, you need to do your own encoding (eg: uuencode or mime encode).

chrism01 08-11-2008 11:49 PM

Yep nail: http://linux.die.net/man/1/nail


All times are GMT -5. The time now is 11:51 PM.