Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mailx help: Alias name in the "from" address

Status
Not open for further replies.

svivekh

Programmer
Oct 28, 2002
11
US
Hi all,

I am using "mailx" command for sending mail in unix system. When i send a mail from unix (login name is "test") i am getting the "from" address in the mail as "test@SMTP001-5@company.com". I need something like this

Administrator (test@SMTP001-5@company.com)

Basically i need to have "administrator" in the "from" address instead of "test@SMTP001-5@company.com".

Please help. Suggestions are greatly appreciated.

Thanks in Advance.


Regards
Vivek
 
I am having the same problem now as svivekh. I can not find any examples of this.

Any ideas?

 
With [tt]mailx[/tt] there is a switch to set the "Reply To" field. You can't specify just anything, but you can give a different email address that from what it was sent from.
Code:
cat msg.txt | mailx -s "Subject" -r Admin@company.com someone@host.com
This would have the reply to be [tt]Admin@company.com[/tt], no matter which userid sent it. This is good when you have a cron job sending emails and you don't want replies being sent to it, but to somewhere else where you can get the reply.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top