On Thu, May 31, 2001 at 06:43:34PM +0000, scott lutz wrote:
> I have looked through all of the doc and even searched CPAN, but can find no
> reference to using the Bcc feature.
>
> # Send the header.
> $smtp->datasend("To: test <$address_1>\n");
> $smtp->datasend("Bcc: test2 <$address_2>\n");
> $smtp->datasend("From: $myname <$myemail>\n");
> $smtp->datasend("\n");
>
> I am using this on a Win32 machine also using 'use strict;'.
> Any help ??
You're at the wrong level. Headers are completely ignored, with regard to
who receives the message, at the SMTP level. The important information is
in the envelope (your mail() and to() method calls).
Bcc is implemented by MTAs (that's mail transport agents, like sendmail,
postfix, qmail, etc.) by initiating a brand new SMTP conversation for each
address in the Bcc header, and omitting the Bcc header from the headers
sent.
So, you'll have to do the same thing, initiate seperate SMTP conversations
for each of your Bcc addresses. That, or use a higher level module, such as
Mail::Mailer, Mail::Sendmail, or any one of the other mail modules found on
CPAN.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--