Hi Tadhg,
Shouldn't it be just:
content_type => 'text/html' ?
Nick
On 18/12/12 20:36, Tadhg wrote:
Hi,
I can't 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's being displayed as plain text in the received email.
It's 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 => '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:*
...
$c->stash(add_log_line => $add_log_line,
template => 'log/add_general.tt <http://add_general.tt>');
$c->forward($c->view('HTML'));
$c->email(
header => [
From => 'b...@bob.com <mailto:b...@bob.com>',
To => 'f...@bob.com <mailto:f...@bob.com>',
Subject => 'An error has been reported'
],
body => $c->view('HTML')->render($c,'log/email_msg.tt
<http://email_msg.tt>'),
content_type_set => 'text/html'
);
*Received Mail:*
<!DOCTYPE>
<body>
<table>
<tr>
<th>msg_type</th>
<th>message</th>
<th>source_hostname</th>
...
Thanks,
Tadhg Daley
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/