The problem may be that your message is not well-formed.  A valid
RFC2822 message (the part you send after "DATA" in the SMTP
transaction) has a header, then a blank line, then a body.  I believe
the header is required to have a "To" field, and possibly some others
as well; I forget which headers are technically required.

Anyway, perhaps the Exchange mail-in folder is rejecting malformed
messages.  I would try this:

        use Net::SMTP;
        $smtp = Net::SMTP->new('mailserver.comp.com');
        $smtp->mail('[EMAIL PROTECTED]'); 
        $smtp->to('[EMAIL PROTECTED]');       
        $smtp->data();                     
        $smtp->datasend("Subject: perfmon threshold exceeded\n");
        $smtp->datasend("To: [EMAIL PROTECTED]");
        $smtp->datasend("\n");
        $smtp->datasend("this is a test message\n");
        $smtp->dataend();                   
        $smtp->quit;

Note the "To" header.  This is not necessarily redundant; the
$smtp->to() method is setting the envelope recipient, which is
distinct from the message recipient.

 - Pat
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to