>Did you try the below as a success test ? :

>if ($msg->last_send_successful) {
>       print "message successful\n";
>} else {
>       print "message not successful\n";
>}

No, I did not try that. That method (last_send_successful) is not shown
in my local MIME::Lite docs, but I did find it mentioned on CPAN. The
CPAN docs state:  After sending, the method last_send_successful() can
be used to determine if the send was successful or not.

Since the send method was what caused the croak and that was what needed
to be trapped if it failed, I saw no reason to add a test after calling
the offending method. But since you ask, I decided to try it.

The result:
2006-09-14_22:36:28
Failed to connect to mail server: Unknown error
 at ReplWatcherCroakTest.pl line 168

2006-09-14_22:36:28
Can't locate object method "last_send_successful" via package
"MIME::Lite" at ReplWatcherCroakTest.pl line 169.

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to