Closed agordon closed 12 years ago
Thanks for the detailed description. I will try to see if there is a short term solution to this. In the long term, I am seriously considering doing a major rewrite which will use Email::Sender instead of Email::Send. This will remove the Return::Value stuff. See issue #5 for more background.
I have finally done a major refactor of this plugin to use Email::Sender. Now, calling the email()
function will invoke Email::Sender::Simple's sendmail function, which will throw an exception on failure. Please try the new version and make sure everything still works for you. I have made a dev release to CPAN. You could also checkout the latest master branch.
Hello,
I'm having problems checking the return status of email sending with "Dancer::Plugin::Email" .
The first example in the "code recipes" of "Dancer::Plugin::Email" shows the following:
This is the actual code I used:
This is the error I get: Warning caught during route execution: Use of uninitialized value in string eq at /home/gordon/projects/perl_dancer_test /user_email_verification/lib/user_email_verification.pm line 80.
Trying to dig a little deeper, it seems "$msg" is a "Return::Value" object, and that class is deprecated.
Also, "$msg->{type}" returns an empty string (so it's not the problem), but "$msg->{string}" returns undef. and "Data::Dumper($msg)" gives:
I'm using Perl 5.10.1 , Dancer 1.3702, Dancer::Plugin::Email 0.1300 .