Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Mail::Sender question... again

by ryddler (Monk)
on Jun 29, 2001 at 03:40 UTC ( [id://92527]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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 12:14 UTC
    ryddler, Thanks, that did the trick. Works fine now. Bradley
    Where ever there is confusion to be had... I'll be there.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://92527]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.