Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: mime lite

by Anonymous Monk
on Aug 18, 2009 at 22:19 UTC ( [id://789623]=note: print w/replies, xml ) Need Help??


in reply to Re^2: mime lite
in thread mime lite

I found something that may work, however, the way he was handling it was a little different that what I need: using Test::Trap

What will make this work?
use Test::Trap qw/ :output(systemsafe) /; $_sendError = ""; trap { $msg->send('smtp', 'mail.wholewellnessclub.com', AuthUser=> +'somemailuser@somedomain.com', AuthPass=>'$_encEmPass') || $_sendErro +r = $@ }; $_ and $_sendError = $_ for $trap->die, $trap->stdout, $trap->stde +rr; if($_sendError) { return 0; } else { return 1; }
I don't want to print anything, I just need to catch the error IN a variable so that I can have my system continue. It emails me any errors that the programming catches.

Thank you for any advice you can offer for this to work.
Right now I get this error:
Can't modify logical or (||) in scalar assignment at /path/to/data/fil +e/Send_Mime_Lite_Email.data line 39, near "$@ }" # That code is above...
Thanks again in advance.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://789623]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-25 22:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found