2 Catalyst::Plugin::Email - (DEPRECATED) Send emails with Catalyst
6 # please use Email::MIME::Kit or Catalyst::View::Email::Template instead
10 __PACKAGE__->config->{email} = [qw/SMTP smtp.oook.de/];
14 From => 'sri@oook.de',
22 Send emails with Catalyst and Email::Send and Email::MIME::Creator.
25 A common practice is to handle emails using the same template language
26 used for HTML pages. This can be accomplished by pairing this plugin
27 with Catalyst::Plugin::SubRequest.
29 Here is a short example of rendering an email from a Template Toolkit
30 source file. The call to $c->subreq makes an internal call to the
31 render_email method just like an external call from a browser. The
32 request will pass through the end method to be processed by your View
35 sub send_email : Local {
36 my ( $self, $c ) = @_;
41 Subject => 'A TT Email',
43 body => $c->subreq( '/render_email' ),
45 # redirect or display a message
48 sub render_email : Local {
49 my ( $self, $c ) = @_;
52 names => [ qw/andyg sri mst/ ],
53 template => 'email.tt',
59 [%- FOREACH name IN names -%]
80 Catalyst, Catalyst::Plugin::SubRequest, Email::Send,
84 Sebastian Riedel, "sri@cpan.org"
87 This program is free software, you can redistribute it and/or modify it
88 under the same terms as Perl itself.