--- /dev/null
+Revision history for Perl extension Catalyst::Plugin::Email.
+
+0.03 Wed Feb 02 18:00:00 2005
+ - bugfix
+
+0.02 Sun Jan 30 18:00:00 2005
+ - new api
+
+0.01 Fri Jan 28 22:00:00 2005
+ - first release
--- /dev/null
+package Catalyst::Plugin::Email;
+
+use strict;
+use Email::Send;
+use Email::MIME;
+use Email::MIME::Creator;
+
+our $VERSION = '0.03';
+
+=head1 NAME
+
+Catalyst::Plugin::Email - Send emails with Catalyst
+
+=head1 SYNOPSIS
+
+ use Catalyst 'Email';
+
+ __PACKAGE__->config->{email} = [qw/SMTP smtp.oook.de/];
+
+ $c->email(
+ header => [
+ From => 'sri@oook.de',
+ To => 'sri@cpan.org',
+ Subject => 'Hello!'
+ ],
+ body => 'Hello sri'
+ );
+
+=head1 DESCRIPTION
+
+Send emails with Catalyst and L<Email::Send> and L<Email::MIME::Creator>.
+
+=head2 METHODS
+
+=head3 email
+
+=cut
+
+sub email {
+ my $c = shift;
+ my $email = $_[1] ? {@_} : $_[0];
+ $email = Email::MIME->create(%$email);
+ my $args = $c->config->{email} || [];
+ my @args = @{$args};
+ my $class;
+ unless ( $class = shift @args ) {
+ $class = 'SMTP';
+ unshift @args, 'localhost';
+ }
+ send $class => $email, @args;
+}
+
+=head1 SEE ALSO
+
+L<Catalyst>.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@cpan.org>
+
+=head1 COPYRIGHT
+
+This program is free software, you can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut
+
+1;
--- /dev/null
+Changes
+Email.pm
+Makefile.PL
+MANIFEST This list of files
+README
+test.pl
+META.yml Module meta-data (added by MakeMaker)
--- /dev/null
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ NAME => 'Catalyst::Plugin::Email',
+ AUTHOR => 'Sebastian Riedel (sri@oook.de)',
+ PREREQ_PM => {
+ Catalyst => '2.99',
+ Email::Send => 0,
+ Email::MIME => 0,
+ Email::MIME::Creator => 0
+ },
+ VERSION_FROM => 'Email.pm'
+);
--- /dev/null
+NAME
+ Catalyst::Plugin::Email - Send emails with Catalyst
+
+SYNOPSIS
+ use Catalyst 'Email';
+
+ __PACKAGE__->config->{email} = qw/SMTP smtp.oook.de/;
+
+ $c->email(
+ header => [
+ From => 'sri@oook.de',
+ To => 'sri@cpan.org',
+ Subject => 'Hello!'
+ ],
+ body => 'Hello sri'
+ );
+
+DESCRIPTION
+ Send emails with Catalyst and Email::Send and Email::MIME::Creator.
+
+ METHODS
+ email
+SEE ALSO
+ Catalyst.
+
+AUTHOR
+ Sebastian Riedel, "sri@cpan.org"
+
+COPYRIGHT
+ This program is free software, you can redistribute it and/or modify it
+ under the same terms as Perl itself.
+
--- /dev/null
+use strict;
+use Test::More tests => 1;
+
+BEGIN { use_ok('Catalyst::Plugin::Email') }