1 package Catalyst::Plugin::Email;
6 use Email::MIME::Creator;
12 Catalyst::Plugin::Email - Send emails with Catalyst
18 __PACKAGE__->config->{email} = [qw/SMTP smtp.oook.de/];
22 From => 'sri@oook.de',
31 Send emails with Catalyst and L<Email::Send> and L<Email::MIME::Creator>.
41 my $email = $_[1] ? {@_} : $_[0];
42 $email = Email::MIME->create(%$email);
43 my $args = $c->config->{email} || [];
46 unless ( $class = shift @args ) {
48 unshift @args, 'localhost';
50 send $class => $email, @args;
59 Sebastian Riedel, C<sri@cpan.org>
63 This program is free software, you can redistribute it and/or modify it
64 under the same terms as Perl itself.