[Catalyst] Sending Email from Page?

Octavian Rasnita orasnita at gmail.com
Tue Mar 22 06:31:05 GMT 2011

From: "John M. Dlugosz" <wxju46gefd at snkmail.com>
> On 3/21/2011 2:47 PM, Octavian Rasnita orasnita-at-gmail.com 
> |Catalyst/Allow to home| wrote:
>> If you use that key, the module won't report the error. If you don't use 
>> it and there will appear some errors, it will generate a detailed error. 
>> The error is generated by Email::Sender::Simple directly.
>> It will be something like "unable to establish SMTP connection" plus ~ 1 
>> kB of error trace.
> I found it; thanks.  I started a discussion on PerlMonks because $@ was 
> empty, even though letting the program die instead showed all the error 
> info.  You must use Try::Tiny to try/catch around it.

I prefered to use send() or try_to_send() depending on the user's 
preference - if he wants or not to have the errors reported, but yes, using 
Try::Tiny may be a good alternative that should be investigated.


More information about the Catalyst mailing list