I moved the old code from the old unix window to the new unix box, and I had difficulty sending perl script messages to multiple recipients. He works on an old box.
Old perl box: version 5.004_04 created for PA-RISC2.0
New perl box: v5.8.8 for IA64.ARCHREV_0-thread-multi-LP64
Here's the basics of the script (stripped down):
use Net::SMTP::Multipart;
$to = "sam\@bogus.com tom\@foo.com";
$smtp = Net::SMTP::Multipart->new($smtpserver);
$smtp->Header(To => $to,
From => "junk\@junk.com",
Subj => "This is a test.");
$smtp->Text("Hello, world!\n");
$smtp->End();
This works if I change it to $to = "justOneEmail\@address.com", but if I have two or more email addresses (separated by spaces), it no longer works. I do not receive an error message, but the message does not appear.
Any ideas why?
source
share