Mail with From Address


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mail with From Address
# 1  
Old 08-04-2011
Mail with From Address

hello all

When i send an email using "mail" command, it is received by intended receiver but From Adress is getting displayed as user@hostname.
Is there any way to change the From address of Email to xxx@bbb.com?

Apprecite your response
# 2  
Old 08-05-2011
echo "testing 1 2 3 " | mailx -s "subject" -r <sender_mailid> <receiver_mailid>
# 3  
Old 08-05-2011
Code:
 
(
echo "From: xxx@bbb.com "
echo "To: xxx@bbb.com "
echo "MIME-Version: 1.0"
echo "Content-Type: multipart/alternative; " 
echo "Subject: Test HTML e-mail." 
echo "Content-Type: text/html" 
echo "" 
echo "Test Email"
) | sendmail -t

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

How to send mail with sender mail address and name?

Hi, I am trying to send a mail using "mail" command in unix. I wanted to give sender name and sender address. I tried different options ,but still it shows only mail address(No name). mail -s "Alert mail : Nothing running !!!" $email -- -F"Mail Alert" -fno-reply@alert.com But I am getting... (4 Replies)
Discussion started by: jaggy
4 Replies

2. UNIX for Advanced & Expert Users

UNIX mail blank in the TO address

Hi All, Can we send a mail in unix blank in TO address with CC and BCC. TO address should be blank CC should not be blank BCC should not be blank thanks, (7 Replies)
Discussion started by: kiranparsha
7 Replies

3. Shell Programming and Scripting

mail using mail address in a file

I have a file which contains few email address. I have few scripts which use the same mail address. so if any change in mail id like if any user do not want to receive the mail i can just edit a single file instead of many scripts. So i want the scripts to use that file. How can this be done. (2 Replies)
Discussion started by: gpk_newbie
2 Replies

4. Shell Programming and Scripting

mailx -s not sending the file to mail address

Hi All, OS:Red Hat Linux 4 86x64 Below is my shell script which is not sending mail to the mail recipient: #!/bin/bash export MAILLIST="xyz@yahoo.com" cd <path_to_the_script_perf_report.sql> sqlplus / as sysdba @perf_report.sql if then cat <path_to_the_script/*MONTHLY*REPORT*.lst... (6 Replies)
Discussion started by: a1_win
6 Replies

5. Shell Programming and Scripting

Perl how to replace e-mail address from the file

I have a script which updates the users e-mail address according to wherever the users type in the browser. The script does other stuffs but this what i am struggling with ..lol. Basically, we are using the command below to try to update the e-mail, however since the e-mail address has "@" the perl... (2 Replies)
Discussion started by: cacm1975
2 Replies

6. UNIX for Dummies Questions & Answers

send mail file from server to another address

HP-UX B11.23 ia64 I have a users mail inbox in /var/mail I want to send all the mail there to another address (an Exchange address). At the Exchange address, I want it to appear as the original separate emails, with attachments in their original form (e.g. still MIME encoded). Is that... (6 Replies)
Discussion started by: LisaS
6 Replies

7. Shell Programming and Scripting

Pull E-mail address from file, send e-mail

Hello, I am new to perl and need to create a script that will read a file and pull a name from the file and send e-mail. How can I use the following awk statement in a perl script? grep UNIXadmins /root/mail.conf | awk '{ print $2}' and use the output to send a e-mail. Any help would... (1 Reply)
Discussion started by: DC Heard
1 Replies

8. AIX

Change sender e-mail address

When sending emails to the outside world, aix present itself as d_prod@production1.pdc.itercom.org. This is causing some issue with our e-mail server. So we need to change the name to d_prod@itercom.org... Does any one know how this can be accomplished? Thank you (3 Replies)
Discussion started by: cchiang12
3 Replies

9. What is on Your Mind?

Tracing an e-mail address

Not sure if this is the right place to post this, but I thought I'd start here. Not really a Unix question, but I'm hoping the gurus here can help me in an area I know little about. Someone got one of my credit card numbers. Tried to use it to charge a bunch of stuff over the internet. The... (4 Replies)
Discussion started by: denverd0n
4 Replies
Login or Register to Ask a Question