Croaking on errors, need to write tests. Adding Net::SMTP feature in Makefile so...
J. Shirley [Thu, 11 Oct 2007 23:41:50 +0000 (23:41 +0000)]
Makefile.PL
lib/Catalyst/View/Email.pm

index b911820..59d62ec 100644 (file)
@@ -18,5 +18,11 @@ feature 'Mason Support',
     -default => 0,
     'Catalyst::View::Mason';
 
+feature 'Net::SMTP Support',
+    -default => 0,
+    'MIME::Base64',
+    'Authen::SASL';
+
+
 auto_install;
 WriteAll;
index 7fa09dc..fba2330 100644 (file)
@@ -11,7 +11,7 @@ use Email::MIME::Creator;
 
 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 @@ sub process {
     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 @@ Daniel Westermann-Clark
 
 Simon Elliott <cpan@browsing.co.uk> - ::Template
 
+Roman Filippov
+
 =head1 LICENSE
 
 This library is free software, you can redistribute it and/or modify it under