Kozz has asked for the wisdom of the Perl Monks concerning the following question:
Most wise monks:
I am using the module Mail::Send in a particular script because it is the best available on this server. When sending emails, I am getting a rather interesting problem, and am not sure how to deal with it.
The mail gets sent just fine. However, I have a comma-delimited list of recipients in $rs->{'em_bcc'}, and the first address in the bcc list becomes part of a header:$msg = new Mail::Send; $msg->add('From', $rs->{'em_from'} ); $msg->to( $rs->{'em_to'} ); $msg->cc( $rs->{'em_cc'} ); $msg->bcc( $rs->{'em_bcc'} ); $msg->subject( $rs->{'em_subject'} ); # print the message to mail it # $fh = $msg->open(); $fh = $msg->open('sendmail'); # explicit $rs->{'em_body'} =~ s/\n/\r\n/sg; # convert line-endings for windows m +achines. print $fh $rs->{'em_body'}; $fh->close(); # completes message and sends it
Obviously I chose BCC for a reason, but here it's not working. Does this have to do with the order in which I am adding the headers? I don't want any BCC addresses showing up in any of the headers. I've tried setting the to, cc, etc fields when creating the new Mail::Send object too, but it all works the same of course.X-Final-To: bccaddress@site.com
Is this just a sendmail thing that I've never experienced before?
Thanks for your help.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Mail::Send and Bcc revealed
by xorl (Deacon) on Jun 03, 2004 at 20:38 UTC | |
Re: Mail::Send and Bcc revealed
by hsinclai (Deacon) on Jun 03, 2004 at 22:17 UTC | |
Re: Mail::Send and Bcc revealed
by Kozz (Friar) on Jun 04, 2004 at 16:32 UTC |
Back to
Seekers of Perl Wisdom