Associate template to getMailer class

by ClodClod91   Last Updated January 10, 2019 11:10 AM - source

I have created a custom form, after submit send email to recipient with JFactory::getMailer With this class can add body, for example:

$mailer = JFactory::getMailer();
$mailer->addRecipient('[email protected]');
$mailer->setBody('Hello world simple text');

In my case, my template email have many div, styles css, etc, and is pretty ugly include entire html into setBody method. Is there an alternative?



Related Questions


Enable HTML for the user registration e-mail

Updated December 13, 2016 08:04 AM

Load an HTML template and to email

Updated March 09, 2016 07:04 AM

Customize User Account Approved Email

Updated May 24, 2017 01:10 AM

Modify mail on user-creation

Updated February 22, 2016 01:04 AM