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.