Hello Thag, I think plugin is the wrong approach here. Plugins seemed to be good idea in the past, but now they are recommended only if you mess with the internals. I think the recommended think to send emails within Catalyst application is either:
a) https://metacpan.org/module/Catalyst::View::Email or https://metacpan.org/module/Catalyst::View::Email::Template b) create a separe model, like shown here http://modernperlbooks.com/mt/2012/07/extracting-a-reusable-catalyst-model.html Cheers, Dimitar On Tue, Dec 18, 2012 at 9:36 PM, Tadhg <tadhg.da...@gmail.com> 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'); **** > > $c->forward($c->view('HTML'));**** > > **** > > $c->email(**** > > header => [**** > > From => 'b...@bob.com',**** > > To => 'f...@bob.com',**** > > Subject => 'An error has been reported'**** > > ],**** > > body => $c->view('HTML')->render($c,'log/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/