Dear Amish Munshi
You may be using mailx instead of mail command. I get following error (i.e syntax of mail command) when it is run as you suggested #cat email.txt | mail -s "subject" -r sender@domain1.com receiver@domain2.com mail: invalid option -- r Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ... [- sendmail-options ...] mail [-iInNv] -f [name] mail [-iInNv] [-u user]
Bilal
On Sat, 1 Jan 2005 09:38:54 +0530, "Bilal Ahmed Mazhar" bilal@goldenswan.com said:
Dear Amish Munshi
You may be using mailx instead of mail command. I get following error (i.e syntax of mail command) when it is run as you suggested
Try this,
$ cat /etc/hosts | mail -s "test message" -a "From: "Mr. Foo Bar" foo@bar.com" anurag@unknown.com
now, this works with "mail" that comes with Debian woody.
-Anurag
On Sat, Jan 01, 2005 at 09:38:54AM +0530, Bilal Ahmed Mazhar wrote:
#cat email.txt | mail -s "subject" -r sender@domain1.com receiver@domain2.com mail: invalid option -- r Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ... [- sendmail-options ...] mail [-iInNv] -f [name] mail [-iInNv] [-u user]
I am using mailx. -r works for me.
Amish.