Sending HTML body as HTML mail in MailtemplateDispatch
This commit is contained in:
@@ -61,10 +61,15 @@ class MailtemplateDispatch extends mfBaseModel {
|
|||||||
|
|
||||||
$email = new Emailnotification();
|
$email = new Emailnotification();
|
||||||
$email->setSubject($subject);
|
$email->setSubject($subject);
|
||||||
$email->setBody($body);
|
if($this->getProperty("mailtemplate")->body_html) {
|
||||||
|
$email->setHtmlBody($body);
|
||||||
|
} else {
|
||||||
|
$email->setBody($body);
|
||||||
|
}
|
||||||
|
|
||||||
$email->setFrom($from_email, $from_name);
|
$email->setFrom($from_email, $from_name);
|
||||||
$email->setTo($to);
|
$email->setTo($to);
|
||||||
$email->setHeader("X-".ucfirst(MFAPPNAME)."-mnid", $this->id);
|
$email->setHeader("X-".ucfirst(MFAPPNAME)."-mtdid", $this->id);
|
||||||
if(count($attachments)) {
|
if(count($attachments)) {
|
||||||
foreach($attachments as $file) {
|
foreach($attachments as $file) {
|
||||||
$email->addAttachment($file["path"], null, $file["filename"], $file['mimetype']);
|
$email->addAttachment($file["path"], null, $file["filename"], $file['mimetype']);
|
||||||
|
|||||||
Reference in New Issue
Block a user