bcc: POD corrections thanks to Lance Brown <lance@bearcircle.net>
[catagits/Catalyst-View-Email.git] / lib / Catalyst / View / Email / Template.pm
index e783585..66d54e0 100644 (file)
@@ -11,7 +11,7 @@ use Email::MIME::Creator;
 
 use base qw/ Catalyst::View::Email /;
 
-our $VERSION = '0.10';
+our $VERSION = '0.11';
 
 =head1 NAME
 
@@ -64,6 +64,7 @@ the template instead of the body and forwarding to your Email::Template view:
             from        => 'no-reply@foobar.com',
             subject     => 'I am a Catalyst generated email',
             template    => 'test.tt',
+            content_type => 'multipart/alternative'
         };
         
         $c->forward( $c->view('Email::Template') );
@@ -204,7 +205,7 @@ L<Email::Send>.
 =cut
 
 sub process {
-    my ( $self, $c ) = @_;
+    my ( $self, $c, @args ) = @_;
 
     # don't validate template_prefix
 
@@ -214,7 +215,8 @@ sub process {
     
     my $stash_key = $self->{stash_key};
 
-    croak "No template specified for rendering"
+    # Go upstream if we don't have a template
+    $self->next::method($c, @args)
         unless $c->stash->{$stash_key}->{template}
             or $c->stash->{$stash_key}->{templates};