469,964 Members | 1,714 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,964 developers. It's quick & easy.

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 7412
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Alex Hunsley | last post: by
8 posts views Thread by dccarson | last post: by
15 posts views Thread by news.microsoft.com | last post: by
2 posts views Thread by .Net Newbie | last post: by
14 posts views Thread by Mattia | last post: by
1 post views Thread by eight02645999 | last post: by
4 posts views Thread by Michelle | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.