Problem getting mailx to send true Bcc mail to multiple recipients


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Problem getting mailx to send true Bcc mail to multiple recipients
# 1  
Old 10-08-2013
Problem getting mailx to send true Bcc mail to multiple recipients

I am having trouble getting mailx to send multiple Bcc mails out without everyone in the list of recipients seeing everyone else's email addresses. I looked at the man pages of my system and seem to be following the syntax correctly, but the mails still go out as if I were just putting in a list of email addresses. I am running CentOS 6.4 by the way. If someone could give me the right syntax for this environment it would be greatly appreciated. Smilie
# 2  
Old 11-30-2013
Please post your syntax.

Are you using the bcc option?

Code:
       -b address
              Send blind carbon copies to list.  List should be a comma-separated list of names.

# 3  
Old 12-01-2013
Yes, -b included

Hi,

Thanks for getting back to me on this. Yes, I did include the -b and a series of addresses separated by commas. If you can give me an example of how the syntax of a typical message would look that would be useful. Maybe there are parentheses or brackets or something else I missed in there, but I think I did it right, i.e.:
Code:
mailx -b person1@somewhere.com, person2@somewhere.com….

Regards,

Gary

Last edited by vbe; 12-01-2013 at 04:23 AM..
# 4  
Old 12-01-2013
Quote:
Originally Posted by legrandtimonier
Hi,

Thanks for getting back to me on this. Yes, I did include the -b and a series of addresses separated by commas. If you can give me an example of how the syntax of a typical message would look that would be useful. Maybe there are parentheses or brackets or something else I missed in there, but I think I did it right, i.e.:
Code:
mailx -b person1@somewhere.com, person2@somewhere.com....

Regards,

Gary
No. A comma separated list has a comma between entries in the list; not a comma and a space.
Try:
Code:
mailx -b person1@somewhere.com,person2@somewhere.com....

This User Gave Thanks to Don Cragun For This Post:
# 5  
Old 12-01-2013
Uh-oo as Rainman used to say. Many thanks. What a difference a space makes.Smilie

---------- Post updated at 01:03 PM ---------- Previous update was at 09:39 AM ----------

Hi, there still seems to be a problem insofar as when I try doing what you suggested I get a message popping up saying:


Send options without primary recipent specified.

Any idea what's up and how to fix this?

Thanks for your continued help taming this Bcc thing.
# 6  
Old 12-01-2013
You have to send the message To: at least one address. You can Cc: and Bcc: the message to zero or more addresses. If you don't want any of the recipients to know who any of the other recipients are on you Bcc: list, send it to yourself and Bcc everyone else as in:
Code:
mailx -b person1@somewhere.com,person2@somewhere.com legrandtimonier@here.com

This User Gave Thanks to Don Cragun For This Post:
# 7  
Old 12-01-2013
That's it! But one more question about Bccing with mailx

Hi,

That cracked it. The only (very small) problem is that each person in the Bcc sees me in the To: heading of their email. They don't see others, which is perfect for Bcc, but they do see me (i.e. the last one in the code you sent in your previous message with a space at the end of the Bcc list instead of the comma). Is that normal? Is there any way of making sure multiple Bcc recipients see absolutely nothing apart from the originator of the email? But even as things stand right now I can work like this. Thanks for staying with me up to this point. Regards, Gary
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Not able to send the mail using mail and mailx command

Hi All, I am trying to send a mail from linux server but could'nt able to send the mail. I tried the below syntax's so far but no luck. mail -s “Hello world” abc@xyz.com < /usr/g/txt.log cat "txt.log" | mailx -s "Hello world" abc@xyz.com mailx -s “Hello world” abc@xyz.com <... (2 Replies)
Discussion started by: scriptscript
2 Replies

2. Shell Programming and Scripting

Mailx command - send mail as table format

I have to send a couple of rows that have been returned from a SQL query. I have written the output of the query to a file and while i try to print this in the mail body the formatting goes wrong. Intended Output in mail body: Col1 Col2 Col3 ------ ... (2 Replies)
Discussion started by: qwertyu
2 Replies

3. Shell Programming and Scripting

Send mail using mailx to CC only, not TO

Hi All, I am using mailx to send the mail. Due to some changes in the requirement, I need to send the mail to CC only (an Email id in CC), with no email ID in "TO" field. Can we do that? bcz I used -c flag only and got the message:":The flags you gave make no sense since you're not sending... (2 Replies)
Discussion started by: unankix
2 Replies

4. Solaris

Unable to send mail through mailx

Hi, I am using solaris 5.9 OS and I am facing an issues with mailx. My SMTP port is configured to listen 6190 and not the default one which is 25. I can send mail to my inbox when i do it manually through the following steps root@<dbname> # telnet 15.12.88.10 6190 Trying 15.12.88.10...... (0 Replies)
Discussion started by: Srinathkiru
0 Replies

5. Shell Programming and Scripting

send attachment and body in one mail using mailx

Hi, Our requirement is to send an attachment and content in a single mail. I am using the below command to send attachement. --------------------- (uuencode $exp_file $exp_file) |mailx -s "$email_subject" $EmailRecipients -------------------- I m not able to send any message in the... (4 Replies)
Discussion started by: ashwin3086
4 Replies

6. UNIX for Advanced & Expert Users

how to send file as attachment using mail or mailx

I have a need to send a file from the unix command line to be sent as an attachment. Is this possible? That is when I open my outlook email I need to file to appear as an attachment. Also, is there a way to use the mail binary (not mailx) to modify the "reply address". mailx -r works but I need... (1 Reply)
Discussion started by: kieranfoley
1 Replies

7. UNIX for Dummies Questions & Answers

Unable to send e-mail using mailx command

Hi All, Can you please help me in solving this. I am facing some problem sending mails. If I use like this, I am able to send mail the mail echo "This is an automated e-mail; please do not reply." | mailx -s "Good Morning ." 'abc@xys.com' But if I use like this, then I am unable to send... (1 Reply)
Discussion started by: manas6
1 Replies

8. Shell Programming and Scripting

Problem with Mailx command to send mail with attachment

Hi, I am using mailx command to send a mail with attachment. It's working fine, but with attachment I am getting one extra attachment like (ATT00131.txt). I have tried to use unix2dos command also. But still I am getting the extra attachment. I am using the following code: subject="temp... (5 Replies)
Discussion started by: viswanatharv
5 Replies

9. UNIX for Dummies Questions & Answers

using mailx with multiple recipients

I am trying to use a file containing email addresses in my mailx command like the following: SUBJECT="Kronos User Report" BODY="kronos.txt" MAILTO="kronosmail.txt" mailx -s "$SUBJECT" $MAILTO < $BODY This works fine for the body of the message but for the recipient it says: ... (6 Replies)
Discussion started by: sdhalepaska
6 Replies

10. UNIX for Dummies Questions & Answers

using mailx to send a log file to my outlook e-mail account

I like to use mailx -s to send an entire xxxxx.log to my outlook e-mail account. Any help will be appreciated. Thanks. (6 Replies)
Discussion started by: simt
6 Replies
Login or Register to Ask a Question