473,385 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Multiple bcc recipients

This has been hanging over my head for months, so I hope it's not
something silly.

I've created a Perl script where I have to send an email with multiple
bcc's via sendmail. If I have one bcc recipient the script works, but
with more than one no messages get sent to any of the bcc recipients
though the message gets to the real recipient just fine. Also, if I
copy and paste the same headers into sendmail run from the command
line that I created with the script, that works fine too.

Here's the salient part of the script:

$sendmail = 'path_to_sendmail/sendmail'
$bcc = 'Bcc: xx**@yyyyy.com, ww***@vvvv.com, zz***@ttttt.com';
$email = $debug ? $debug_email : $hash{'eMail'};
$from = 'u*@ourselves.com';
$subject = 'You and your poodle';
$text = 'blah blah blah';
open MAIL, "|$sendmail $email"
or die "Unable to start sendmail:$!\n";
print MAIL "From: $from\nBcc:$bcc\nSubject:$subject\n$text";
close MAIL;

Any help is greatly appreciated,
Erica
Jul 19 '05 #1
1 7571
Erica wrote:
I've created a Perl script where I have to send an email with
multiple bcc's via sendmail. If I have one bcc recipient the script
works, but with more than one no messages get sent to any of the
bcc recipients though the message gets to the real recipient just
fine.
<snip>
$bcc = 'Bcc: xx**@yyyyy.com, ww***@vvvv.com, zz***@ttttt.com'; --------------^^^^

<snip>
print MAIL "From: $from\nBcc:$bcc\nSubject:$subject\n$text";

-----------------------------^^^^

You seem to sending:

Bcc: Bcc: xx**@yyyyy.com, etc.

and 'Bcc: xx**@yyyyy.com' is problably not a valid address.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alex Hunsley | last post by:
I'm using the smtp module to send emails from python. I would like to specify several recipients of the email like follows: msg = MIMEText(time.ctime("Body text of email") me =...
8
by: dccarson | last post by:
Here is a snippet of code which does not send to all recipients. However, it also does not inform me of this error. My suspicion is that this only fails for users with longer usernames. The two I...
15
by: news.microsoft.com | last post by:
HI, ASPEmail to send to multiple recipients? I tried to use comma and semicolon but all the time give this message error: Error: 6 - 501 Bad address syntax nor :...
2
by: .Net Newbie | last post by:
Hello, I am currently coding my ASP.Net pages in c# and have run into a question concerning Emails. I have four objects on a page (six including 2 buttons). The first is a subject line...
14
by: Mattia | last post by:
I have a very big problem. I must send a single mail to multiple receivers. The number of receivers are very big: approximately 6000 users, but this number increase each year. I find a lot of...
1
by: eight02645999 | last post by:
hi i currently am using this email function that can send single email address def email(HOST,FROM,TO,SUBJECT,BODY,CC=None): import smtplib import string, sys body = string.join(( "From: %s" %...
4
by: Michelle | last post by:
Hi Is it possible/anyone know how to send a document (.pdf) to multiple recipients using POP where the email is not just a matter of throwing 1000 email addresses in the BCC list, but each email...
0
by: blat001 | last post by:
Hi, Not 100% sure if this is the correct group to post in but. I have a class that I want to serialize/deserialize to match the MM7 specifications, which I have done but now that we are...
2
by: npbaker1 | last post by:
I am not able to get an e-mail sent to multiple recipients. I am using C# in VS 2003. Here is the code: MailMessage mail = new MailMessage(); mail.To =...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.