GagA// 0n D nEt

It is currently Sun May 20, 2018 3:37 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Linux: Change from email address in mail command
PostPosted: Wed Mar 25, 2009 9:05 am 
Offline

Joined: Wed Jul 18, 2007 1:14 am
Posts: 181
Using mail command to send email, but the sender email address being listed to be coming from something like [email protected]? Looking for options in the mail command to change this address?

Many of the sites will answer that this won't be possible in mail command, you need to use sendmail client to send such email(s). I would say other wise.

You can definitely achieve this by using mail command. In other words, you can change the from email address while sending the email using mail command. Following is the syntax that will do the trick:

Syntax:
Code:
mail -s "My Subject" [email protected] -- -f [email protected]

Example:
Quote:

So in the above example, the mail will be sent to [email protected] but the sender email address will be [email protected] and NOT [email protected]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group