[NTLUG:Discuss] Command Line Email
Fred James
fredjame at fredjame.cnc.net
Wed Dec 18 14:09:24 CST 2013
George Lass wrote:
> 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
>
George Lass
It has been a long time, but I did solve that one on both IRIX and Linux
... the way I did it was to build those stubborn parts into the
message. It seems to me I had to begin the line with a dot (.), but I
may be thinking of something else, eh?
I wonder if this (following would do the same thing (man mail on my
system brings up mailx)?
<snip from man mailx>
MAILX_HEAD
A string to put at the beginning of each new message. The
escape sequences `\t' (tabulator) and `\n' (newline) are understood.
</snip from man mailx>
Hope that helps
Regards
Fred James
More information about the Discuss
mailing list