Email with cc and bcc option


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Email with cc and bcc option
# 1  
Old 03-23-2011
Email with cc and bcc option

Hi,
I am able to send email from AIX using the following command.
Code:
cat email.txt | mail -s "Mail Subject" venkat@gmail.com

Our requirement is send email with cc and bcc option.
We are getting email with from email address as our UNIX server user.
We would like to change that, please let us know how do we change this.

Thanks in advance for clue or help.
Thanks
Venkat

Last edited by Franklin52; 03-23-2011 at 06:22 AM.. Reason: Please use code tags
# 2  
Old 03-24-2011
Some mail/mailx commands have -b and -c for this. You can port your own email clients pretty easily.
https://www.unix.com/man-page/All/0/mail/
# 3  
Old 03-25-2011
Try use tilde escapes, e.g.
Code:
( echo "~b $bccAddr" 
 echo "~c $ccAddr" 
 cat email.txt ) | mail -s "Mail Subject" venkat@gmail.com

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[Solved] adding email option to KSH

Hi, I wanted to add a email option to this script. and was wondering if anyone could help me out. #!/bin/ksh echo "Finding hdisk" <DIR>/find-disk i=1 b=0 p=0 while ... (2 Replies)
Discussion started by: vpundit
2 Replies

2. Shell Programming and Scripting

cc and bcc and to command in shellscript

Hi All, I have tried some below commands , some of these are working. some are not working. I want to add this "TO ,cc, bcc, from " in shellscript. can anyone give me the example for this. mailx -s "$SUBJECT5" "$EMAIL" < $EMAILMESSAGE above code is working but i want to... (5 Replies)
Discussion started by: aish11
5 Replies

3. Shell Programming and Scripting

ping script with email option

Hi I have already posted about this issue here and I got reply from some members. Now I need few modifications to be done. Can someone assist ? I need a script to be put in cron and this script should run everyday morning at 06:00 AM. I have a filed named "network_hosts" and the below are... (7 Replies)
Discussion started by: newtoaixos
7 Replies

4. Shell Programming and Scripting

how do I change the email sender if I donot have the -r option?

Hey, after I check the man page for mail and mailx, I did not find the -r option. But, I have to change the email sender, how can I do it? Send Mode mailx address... Receive Mode mailx -e mailx mailx -f ... (0 Replies)
Discussion started by: freelong
0 Replies

5. Shell Programming and Scripting

Bcc in mailx command in Unix

Hi, At present we have been using the mailx command which is working perfectly and the command is as follows; mailx -s "$DESCR1" -c $DLIST_CC -r $REPLY $DLIST We would like to add a Blind carbon copy "Bcc" in this mailing list using mailx. Please let us know how this can be done in ksh. (2 Replies)
Discussion started by: jmathew99
2 Replies

6. UNIX for Advanced & Expert Users

Help needed on unix mail with bcc,

Hello Everyone, I'm using UNIX 5.3, I'm using command line mailx or mail command to send emails to multiple email addresses and i need to include bcc (background corbon copy). Some Manuals says i can use -b flag to send to bcc but my unix does not recognize the flag "-b". And some manuals says... (2 Replies)
Discussion started by: aravindbachu
2 Replies

7. UNIX for Advanced & Expert Users

mail command with bcc, cc

Can anyone tell me how to add bcc or cc email address to mail command? (1 Reply)
Discussion started by: aravindbachu
1 Replies

8. Shell Programming and Scripting

Unix mail with bcc option

Hello Everyone, I'm using UNIX 5.3, I'm using command line mailx or mail command to send emails to multiple email addresses and i need to include bcc (background corbon copy). Some Manuals says i can use -b flag to send to bcc but my unix does not recognize the flag "-b". And some manuals says... (1 Reply)
Discussion started by: aravindbachu
1 Replies

9. UNIX for Dummies Questions & Answers

bcc in mails

Hi, how to put some receipients for mail in bcc and some receipients in to. (2 Replies)
Discussion started by: prasee
2 Replies

10. Shell Programming and Scripting

BCC address not working (mimesender)

I modified the following mimesender script so I can send also to BCC adresses: https://www.unix.com/showthread.php?t=17065 Everything is working and correct. Except the email address(es) in BCC are not delivered. When I set the debug-mode ON I can see the BCC header and when I receive the... (1 Reply)
Discussion started by: michaelv
1 Replies
Login or Register to Ask a Question