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


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 02-11-2011
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,
Andy

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

Ok I managed to get it working by using following -


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

Thanks everyone,
Andy
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image 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 11:38 AM
how do I change the email sender if I donot have the -r option? freelong Shell Programming and Scripting 0 08-13-2010 11:55 AM
change mail sender in unix aix Arunprasad Shell Programming and Scripting 7 06-29-2009 09:15 AM
Sender email address has to changes balajiora Shell Programming and Scripting 1 06-12-2009 09:55 AM
Change sender e-mail address cchiang12 AIX 3 11-18-2006 02:18 PM



All times are GMT -4. The time now is 10:04 PM.