2
Quote:
javier wrote:
Hi,
I want include html/advertising codes in the mails of register, notifications of new replys,etc.
But since the mail template files are *.tpl its possible to include html??
thanks in advance.
Best Regards.
javier
Hello javier
It can be done quite easily if you don't have a problem messing a bit with the code.
Usually when you want to do it per module (or per system action) you need to look for the function that send the desired mail (it can be done more easily if you know which .tpl file is being sent (in whice you need html)
... so you simply make a search in the code for it's call (for instance if you use the "weblinks" module and want to change it's "approval massage" and you know that "link_approve_notify_anon.tpl" or "link_approve_notify.tpl" are being sent in this event, simply make a search in the code (I use the Homesite editor, but any editor will do of course) ... for "link_approve_notify" .. it's found at weblinks/admin/modify.php.
now you need to add one line near the call to the
$xoopsMailer->useMail();
turning it to:
$xoopsMailer->useMail();
$xoopsMailer->setContentType("text/html");
now, save, upload,
make your tpl files HTML designed ... since line breaks won't work in them from now on...
I showed an example for weblinks "new site approval notification", but it can be easily done to almost every action, module, or any tpl file desired...
Enjoy