in reply to Mail::Sender error
$sender->Open( ... ) or die "Error: $Mail::Sender::Error\n";
I always wrap stuff like this (Mail::Mailer) in one sub (or local package) that dies on error and then I just eval the call.
sub mymail { my( $to, $text ) = @_; eval { Local::Mail::send( $to, $text ); }; warn "Errors: $@\n" if $@; }
and then in the Local::Mail::send method would just be a wrapper for Mail::Sender that dies on any error.
-derby
updateI just perused the source of Mail::Sender and noticed that an exit value of 40 is SERVNOTAVAIL (and it closes the socket which explains the rest of your error messages). Moral: check for errors and act appropriately.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Mail::Sender error
by neilwatson (Priest) on Aug 15, 2002 at 19:07 UTC | |
by derby (Abbot) on Aug 15, 2002 at 19:27 UTC | |
by neilwatson (Priest) on Aug 15, 2002 at 20:00 UTC | |
by vek (Prior) on Aug 15, 2002 at 19:35 UTC |