FW: MailScanner Multiple Recipients from Perl Scripts

Stephen Conway sconway at WLNET.COM
Thu Nov 4 23:32:23 GMT 2004


    [ The following text is in the "iso-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Hello:

Sorry, meant to send this to the list.

Thanks,

Steve
-----Original Message-----
From: Stephen Conway [mailto:sconway at wlnet.com]
Sent: Thursday, November 04, 2004 6:27 PM
To: 'Julian Field'
Subject: MailScanner Multiple Recipients from Perl Scripts

Hello:

We have a lot of custom perl scripts that do various things, among them is
to send reports / emails to 1 or more recipients.  I have noticed that when
running MailScanner, if you try to send an SMTP message from within an
external perl script where you send to multiple recipients , ex:

    $mailhost='domain.com';
    $recipient="recip1 at domain.com,recip2 at domain2.com,recip3 at domain3.com";
    $sender='sender at domain.com';
    $smtp = Net::SMTP->new("$mailhost", Timeout => 30,debug =>1,);
if ($smtp) {print PLOG "SMTP session START ok\n";} else{print PLOG "SMTP
session START failed\n"; close();exit}
    $smtp->mail($sender);
    $smtp->recipient($recipient);
    $smtp->data();
    $smtp->datasend("From: $sender\n");
    $smtp->datasend("To: $recipient\n");
    $smtp->datasend("Subject: $msg_sub\n");
    $smtp->datasend("\n");
    $smtp->datasend("$msg");
    $smtp->dataend();
    $smtp->quit;

When sending as above, with multiple recipients via a MailScanner system,
there are problems, i.e. local configuration errors , and problems where the
receiving servers reply with errors , even if both recipients exist and are
OK.

Can you please let me know what might be causing the above?

Thanks,

Steve

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).




More information about the MailScanner mailing list