> I tried to trap this issue in my code using "eval", but was
> unsuccessful.
> 
> if (eval {$msg->send}) {
>     print "message sent\n";
> }
> else {
>     print "Failed to send: [EMAIL PROTECTED]";
> }
> 
> Did I use the eval improperly or is there a better to prevent the
> stopping of my process?


[Bullock, Howard A.] 
I have working code using MIME::Lite...

[Bill Luebkert Wrote]
eval { $msg->send; };
if ($@) {
    print "Failed to send: $! ($^E)";
} else {
    print "message sent\n";
}

[Bullock, Howard A.] 
What is different about your code other than not placing the "eval" in
an "if" block?  Is the missing semi-colon in the eval block the issue?

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

Reply via email to