filmo has asked for the wisdom of the Perl Monks concerning the following question:

To send a MIME entity using MIME::Lite, one uses
$email_msg->send();
The question is, is there a way to test if the message is successfully sent? Such as:
$test = $email_msg->send();
I didn't see anything about this in the documentation for MIME::Lite
--
Filmo the Klown

Replies are listed 'Best First'.
Re: Testing for successful
by kschwab (Vicar) on Aug 17, 2001 at 02:22 UTC
    From my MIME::Lite docs:
    send HOW, HOWARGS... 
    
    Class/instance method. This is the principal method for 
    sending mail, and for configuring how mail will be sent. 
    As an instance method (with no arguments), sends the
    message by whatever means has been set up (the default is
    to use the Unix "sendmail" program). Returns whatever 
    the mail-handling routine returns: this should be true on 
    success, false/exception on error: 
    
        $msg = MIME::Lite->new(From=>...);
        $msg->send || die "you DON'T have mail!";
    
    
    Of course, just because sendmail didn't error doesn't mean the mail got delivered. You could try the send_by_smtp method instead, but that's still subject to soft email bounces.