in reply to Re^2: MIME::Lite 250 OK QUEUE ID???
in thread MIME::Lite 250 OK QUEUE ID???

The documentation implies that send will not die on failure, that it will simply return false, so
$message->send or do_something(); $message->send; if( ! $message->last_send_successful ){ $ERROR = "ERROR from MX: $mx_record\n"; }
If indeed send might die, the documentation needs updating (file a bug report).

"Can't locate object method "last_send_successful" via package "MIME::Lite"

Install the latest MIME::Lite

Replies are listed 'Best First'.
Re^4: MIME::Lite 250 OK QUEUE ID???
by ig (Vicar) on Oct 15, 2010 at 15:33 UTC

    MIME::Lite will die on various errors when sending via smtp.

    MIME::Lite says, of its send_by_smtp method:

    Returns: True on success, croaks with an error message on failure.

    and Carp says of croak:

    die of errors

    update: corrected reference to MIME::Lite.

Re^4: MIME::Lite 250 OK QUEUE ID???
by Leslie_jones (Initiate) on Oct 16, 2010 at 08:25 UTC
    1: It dies, hence why I'm trapping for it. 2: It is the latest, downloaded and built from the very page that lists the method - perhaps the author needs to check where that link is/was pointing. 3: The answer to my actual question, rather than anal retentive output given by some anonymous numbnuts, is that successful SMTP status messages are not captured.
      It is the latest, downloaded and built from the very page that lists the method - perhaps the author needs to check where that link is/was pointing.

      ?? http://search.cpan.org/perldoc?MIME::Lite -> http://cpansearch.perl.org/src/RJBS/MIME-Lite-3.027/lib/MIME/Lite.pm

      =item last_send_successful This method will return TRUE if the last send() or send_by_XXX() metho +d call was successful. It will return defined but false if it was not successful, + and undefined if the object had not been used to send yet. =cut sub last_send_successful { my $self = shift; return $self->{last_send_successful}; }

      The answer to my actual question, rather than anal retentive output given by some anonymous numbnuts, is that successful SMTP status messages are not captured.

      Yup, its true, you catch more fruit flies with vinegar

        "Yup, its true, you catch more fruit flies with vinegar" That was annulled with 'you catch plenty of anal retentive anonymous assholes at Perlmonks just by asking a question'. Congratulations wanker - top prize.