in reply to Mail::Sender question... again

Everything seems fine, but with a failure your call to $sender->MailFile(...) should be returning an error code which will evaluate as true. Therefore your die "Sender error, $sender, $Mail::Sender::Error!" won't execute.

If Mail::Sender is successful it should return a reference, so what you should do to test for failure is wrap the call like this:

ref ($sender = new Mail::Sender ({from => $mailf[2], smtp => 'localhos +t'})) || die "Sender error: $sender, $Mail::Sender::Error!\n"; ref ($sender->MailFile({to => $mailf[0], subject => $mailf[1], msg => +"@body", file =>$mailf[4]})) || die "Sender error, $sender, $Mail::Sender::Error!";
This should catch your errors for you...

ryddler

Replies are listed 'Best First'.
Re: Re: Mail::Sender question... again
by Dalin (Sexton) on Jun 29, 2001 at 16:14 UTC
    ryddler, Thanks, that did the trick. Works fine now. Bradley
    Where ever there is confusion to be had... I'll be there.