[Catalyst] Catalyst::Plugin::Email, TT, html config problem
Tadhg
tadhg.daley at gmail.com
Tue Dec 18 20:36:55 GMT 2012
Hi,****
** **
I can=92t get SMTP email messages to use HTML encoding using
Catalyst::Plugin::Email and TT. The mails are being generated and contain
the html tags from the correct template and correct stashed data, but it=92s
being displayed as plain text in the received email.****
** **
It=92s a simple logging application, allowing various distributed scripts to
log messages centrally. When an error message is logged I want to generate
a mail to the appropriate admin.****
I'm assuming the "content_type_set =3D> 'text/html'" line is wrong but can't
find what it should be.
Any help would be appriciated, code extracts etc. are below.
**
*App Config:*
use Catalyst qw/****
-Debug****
ConfigLoader****
Static::Simple****
AutoCRUD****
Email****
****
StackTrace****
/;****
** **
*Mail Code:*
=85****
$c->stash(add_log_line =3D> $add_log_line,****
template =3D> 'log/add_general.tt'); ****
$c->forward($c->view('HTML'));****
****
$c->email(****
header =3D> [****
>From =3D> 'bob at bob.com',****
To =3D> 'fred at bob.com',****
Subject =3D> 'An error has been reported'****
],****
body =3D> $c->view('HTML')->render($c,'log/email_msg.tt'),****
content_type_set =3D> 'text/html'****
);****
** **
*Received Mail:*
<!DOCTYPE>****
<body>****
<table>****
<tr>****
<th>msg_type</th>****
<th>message</th>****
<th>source_hostname</th>****
=85****
****
** **
Thanks,****
Tadhg Daley****
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20121218/2582c=
9d8/attachment.htm
More information about the Catalyst
mailing list