content_type: text/plain
sender:
method: SMTP
- host: smtp.myhost.com
- username: username
- password: password
+ # mailer_args is passed directly into Email::Send
+ mailer_args:
+ - Host: smtp.example.com
+ - username: username
+ - password: password
=cut
sub controller : Private {
my ( $self, $c ) = @_;
$c->stash->{email} = {
- to => qq{catalyst@rocksyoursocks.com},
- from => qq{no-reply@socksthatarerocked.com},
+ to => q{catalyst@rocksyoursocks.com},
+ from => q{no-reply@socksthatarerocked.com},
subject => qq{Your Subject Here},
body => qq{Body Body Body}
};
}
}
- if ( $mailer->mailer eq 'SMTP' ) {
- my $host = $self->config->{sender}->{host} || 'localhost';
- $mailer->mailer_args([ Host => $host ]);
+ if ( $self->config->{sender}->{mailer_args} ) {
+ $mailer->mailer_args($self->config->{sender}->{mailer_args});
}
$self->mailer($mailer);
--- /dev/null
+use Test::More tests => 1;
+
+use_ok 'Catalyst::View::Email', 'Catalyst::View::Email::Template';
--- /dev/null
+use Test::More;
+
+eval "use Test::Pod 1.14";
+plan skip_all => 'Test::Pod 1.14 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_files_ok();