Mailx options to change from address


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mailx options to change from address
# 1  
Old 09-21-2015
Mailx options to change from address

hi,

I had a request to change the from email address while sending the email to the users.

Current From email address : pepsimanufacturer@pepsi.com

Requested From Email Adreess: manucturer@pepsi.com

Any idea how the from addres can be changed.

---------- Post updated at 06:42 AM ---------- Previous update was at 05:55 AM ----------

does below command work

man mailx
mailx -r address Pass address to network delivery software. All
tilde commands are disabled.
# 2  
Old 09-21-2015
mailx -r new_from_name does what you want. It does not change the actual source information of the email in the header information. Just what users see on the other end. We have phishing detection software that will flag incoming email with aliases like this, I believe.
# 3  
Old 09-22-2015
yes i would need to change the from address in the email permanetly.
any idea how it can be changed permanently.
# 4  
Old 09-22-2015
Hello arun,

Could you please try following if that helps you.
Code:
MAILFROM=Singh&Singh@Singh.com
TO=Singh@chumma.com
SUBJECT="TEST"
Input_file="/tmp/singh_test/Input_file"
cat - ${Input_file} <<EOF | /usr/sbin/sendmail -oi -t
From: ${MAILFROM}
To: ${MAILTO}
Subject: $SUBJECT
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
EOF

Thanks,
R. Singh
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mailx issue; email address starting with #

Hello All, I have a requirement to generate report and send them to a distribution list. The problem I am facing is when sending out the email using mailx. The email address (DL) we have is starting with # and because of this it's not recognising the email and throwing the below error. ... (2 Replies)
Discussion started by: Pradeep_Raj
2 Replies

2. Shell Programming and Scripting

Mailx command to include sender address

Hi, I m using mailx to send email. I am using sender=server name(display name) echo "body" | mailx -s "subject" -b "bcc address" "to address" -- -f "$sender". I should get email with sender as only display name. In stead i am getting displayname@server address. Please suggest Use code... (1 Reply)
Discussion started by: usrrenny
1 Replies

3. UNIX for Dummies Questions & Answers

Customizing from address in mailx command

Currently I am using mailx command for sending mails. But the mail is sent as from userid@servername by default. Is it possible to customise the from mail address in mailx command? Thanks (2 Replies)
Discussion started by: pandeesh
2 Replies

4. Shell Programming and Scripting

configure from address in mailx command

Hi, I need to configure customized from address in mailx command. Can you pls tell me the option for configuring from address. Thanks Latika (9 Replies)
Discussion started by: latika
9 Replies

5. OS X (Apple)

mailx to external email address

Hi, How can I use "mailx" command to send message to an email address like this? echo "This email body" | mailx -s "my subject" "email@hostname.com" There may be some setup required in sendmail or postfix?? OS = Snow Leopard 10.6 (4 Replies)
Discussion started by: FlyingSquirrel
4 Replies

6. Shell Programming and Scripting

Using mailx to send in the future? Also change "from" address?

Hey, I've got a script using mailx to send an email to the user, but i'd like it if I could have it send the email sometime in the future, not right away. And by future, i mean like 1 minute in the future. And I don't want it to halt the script in anyway. Perhaps there's a way to have it... (3 Replies)
Discussion started by: paqman
3 Replies

7. Shell Programming and Scripting

mailx options

Hi all I want to send a mailx in shell script setting the font and style eg : message should go in Arial style .. How can these be done? Thanks and Regards Navatha (3 Replies)
Discussion started by: Navatha
3 Replies

8. Shell Programming and Scripting

change from address in mailx

Hi, i am sending mails regulary for updation of data. The from addresses dispaly like POP.RECH@skk182.com i want display like oracle@skk182.com can u help me on this. (1 Reply)
Discussion started by: koti_rama
1 Replies

9. UNIX for Dummies Questions & Answers

mailx- can we change the from address in the email that is sent out.

Hello, Is there anyway to change the from address in the email sent using mailx command? I have the following command: mailx -s $subject xxx@xxxx.com < $mail_mesg This defaults to the following format "acctname@usserver.companyname.com" as the from address in the email. Problem is this... (5 Replies)
Discussion started by: radhika
5 Replies

10. UNIX for Dummies Questions & Answers

mailx sender address customisation

Hi All, I'm on UNIX -Solaris... I'm trying to send mail usin Mailx..... The script is working fine and attachments are also being sent.... BUT, when I receive the mail,, the sender address shown is the unix login id name.... Any way by which I could manipulate this in my script command or any... (1 Reply)
Discussion started by: vasan_srini
1 Replies
Login or Register to Ask a Question