Unix/Linux Go Back    

Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

How to change sender email address in mail -s command

Red Hat

Thread Tools Search this Thread Display Modes
Old Unix and Linux 02-11-2011   -   Original Discussion by rockf1bull
rockf1bull rockf1bull is offline
Registered User
Join Date: Feb 2011
Last Activity: 7 December 2011, 2:38 PM EST
Posts: 30
Thanks: 3
Thanked 0 Times in 0 Posts
How to change sender email address in mail -s command

Just having trouble trying to figure out what the option is.

When I do

mail -s "Subject" someuser@example.com

I can't seem to specify "from" or "sender" option as I need it for my task. I tried using --f or -f though it didn't work.

Can someone please tell me what other option should do the above?

Cheers everyone,

---------- Post updated at 04:27 PM ---------- Previous update was at 04:08 PM ----------

Ok I managed to get it working by using following -

mail -s "subject" mail1@server.com -- -r "from@fromserver.com"

Thanks everyone,
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Changing the sender Email address to Alias sithara Shell Programming and Scripting 3 09-07-2010 12:38 PM
how do I change the email sender if I donot have the -r option? freelong Shell Programming and Scripting 0 08-13-2010 12:55 PM
change mail sender in unix aix Arunprasad Shell Programming and Scripting 7 06-29-2009 10:15 AM
Sender email address has to changes balajiora Shell Programming and Scripting 1 06-12-2009 10:55 AM
Change sender e-mail address cchiang12 AIX 3 11-18-2006 03:18 PM

All times are GMT -4. The time now is 01:32 PM.