Catalyst::View::Email::Template

Send Templated Email from Catalyst
Download

Catalyst::View::Email::Template Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • J. Shirley
  • Publisher web site:
  • http://search.cpan.org/~groditi/

Catalyst::View::Email::Template Tags


Catalyst::View::Email::Template Description

Send Templated Email from Catalyst Catalyst::View::Email::Template is a Perl module that sends templated mail, based upon your default view. It captures the output of the rendering path, slurps in based on mime-types and assembles a multi-part email using Email::MIME::Creator and sends it out.CONFIGURATIONUse the helper to create your view: $ script/myapp_create.pl view Email::Template Email::TemplateFor basic configuration look at "CONFIGURATION" in Catalyst::View::Email.In your app configuration (example in YAML): View::Email::Template: # Optional prefix to look somewhere under the existing configured # template paths. # Default: none template_prefix: email # Define the defaults for the mail default: # Defines the default view used to render the templates. # If none is specified neither here nor in the stash # Catalysts default view is used. # Warning: if you don't tell Catalyst explicit which of your views should # be its default one, C::V::Email::Template may choose the wrong one! view: TTSENDING EMAILSending email works just like for Catalyst::View::Email but by specifying the template instead of the body and forwarding to your Email::Template view: sub controller : Private { my ( $self, $c ) = @_; $c->stash->{email} = { to => 'jshirley@gmail.com', cc => 'abraxxa@cpan.org', bcc => 'hidden@secret.com hidden2@foobar.com', 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') ); }Alternatively if you want more control over your templates you can use the following idiom to override the defaults: templates => Requirements: · Perl


Catalyst::View::Email::Template Related Software