[Catalyst-commits] r6981 - in trunk/Catalyst-View-Email: . lib/Catalyst/View

jshirley at dev.catalyst.perl.org jshirley at dev.catalyst.perl.org
Fri Oct 12 00:41:50 GMT 2007


Author: jshirley
Date: 2007-10-12 00:41:50 +0100 (Fri, 12 Oct 2007)
New Revision: 6981

Modified:
   trunk/Catalyst-View-Email/Makefile.PL
   trunk/Catalyst-View-Email/lib/Catalyst/View/Email.pm
Log:
Croaking on errors, need to write tests.  Adding Net::SMTP feature in Makefile so people at least are prompted.

Modified: trunk/Catalyst-View-Email/Makefile.PL
===================================================================
--- trunk/Catalyst-View-Email/Makefile.PL	2007-10-10 15:42:04 UTC (rev 6980)
+++ trunk/Catalyst-View-Email/Makefile.PL	2007-10-11 23:41:50 UTC (rev 6981)
@@ -18,5 +18,11 @@
     -default => 0,
     'Catalyst::View::Mason';
 
+feature 'Net::SMTP Support',
+    -default => 0,
+    'MIME::Base64',
+    'Authen::SASL';
+
+
 auto_install;
 WriteAll;

Modified: trunk/Catalyst-View-Email/lib/Catalyst/View/Email.pm
===================================================================
--- trunk/Catalyst-View-Email/lib/Catalyst/View/Email.pm	2007-10-10 15:42:04 UTC (rev 6980)
+++ trunk/Catalyst-View-Email/lib/Catalyst/View/Email.pm	2007-10-11 23:41:50 UTC (rev 6981)
@@ -11,7 +11,7 @@
 
 use base qw|Catalyst::View|;
 
-our $VERSION = '0.06';
+our $VERSION = '0.07';
 
 __PACKAGE__->mk_accessors(qw(sender stash_key content_type mailer));
 
@@ -190,7 +190,8 @@
     my $message = Email::MIME->create(%mime);
 
     if ( $message ) {
-        $self->mailer->send($message);
+        my $return = $self->mailer->send($message);
+        croak "$return" if !$return;
     } else {
         croak "Unable to create message";
     }
@@ -218,6 +219,8 @@
 
 Simon Elliott <cpan at browsing.co.uk> - ::Template
 
+Roman Filippov
+
 =head1 LICENSE
 
 This library is free software, you can redistribute it and/or modify it under




More information about the Catalyst-commits mailing list