[NTLUG:Discuss] Command Line Email

George Lass george.lass at sbcglobal.net
Wed Dec 18 12:26:22 CST 2013


I am having some difficulties using mail(1)  to send emails and
am hoping someone here can help me out.  In particular, I need a have
a Reply-To: address that is different than the From: address. The man page
for mail says that the "-R address" option will do this, but it doesn't seem to
work for me.

echo "This is a test" | mail -s "Some Interesting Subject" -R someone at Reply.net  someone at Destination.net

Will send a copy of the email to both someone at Reply.net and 
someone at Destination.net. It also does not change the Reply_To address 
in the sent mail. Reversing the order of -s and -R causes mail to ignore
"Some Interesting Subject" which results in an interactive prompt for
the message subject. I suspect it would also send the mail both places...

Does anyone know of a way to make this work?


Thanks,

George Lass


More information about the Discuss mailing list