[Catalyst] Catalyst::View::Email config error after Catalyst upgrade
David Schmidt
davewood at gmx.at
Sat Mar 28 10:59:38 GMT 2009
Hello everyone
I've just upgraded Catalyst from 5.7015 to 5.71001.
If I start my project development server it loads but upon requesting
any page I get the error:
Caught exception in MyApp::View::myEmail->process "Can't send email
without a valid email structure at
/usr/local/share/perl/5.10.0/Catalyst/Action.pm line 46"
On the cpan site of C::V::Email the developer says that the config
options have changed slightly but I cannot figure out wether the docs
represent the new or old config style.
http://search.cpan.org/~jshirley/Catalyst-View-Email-0.13/lib/Catalyst/View/Email.pm
WARNING: since version 0.10 the configuration options slightly changed!
This is were the error comes from in /Catalyst/View/Email.pm
my $email = $c->stash->{$self->{stash_key}};
croak "Can't send email without a valid email structure"
unless $email;
but I have the stash_key configured in MyApp/lib/MyApp.pm
__PACKAGE__->config(
'View::Email' => {
stash_key => 'email',
default => {
content_type => 'text/plain',
charset => 'utf-8'
},
sender => {
mailer => 'SMTP',
mailer_args => {
Host => 'test.smtp.at', # defaults to localhost
username => 'blah',
password => 'foo',
ssl => 1
}
}
}
};
and it also seems to be configured in MyApp/lib/MyApp/View/myEmail.pm
__PACKAGE__->config(
stash_key => 'email'
);
well, that's it for now. thanks in advance for any pointers.
david
More information about the Catalyst
mailing list