Associate template to getMailer class

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

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

Updated December 13, 2016 08:04 AM

Updated March 09, 2016 07:04 AM

Updated May 24, 2017 01:10 AM

Updated February 22, 2016 01:04 AM

Updated April 02, 2019 15:10 PM