Merge branch 'fronkdev' into 'master'
Sending HTML body as HTML mail in MailtemplateDispatch See merge request fronk/thetool!905
This commit is contained in:
@@ -61,10 +61,15 @@ class MailtemplateDispatch extends mfBaseModel {
|
||||
|
||||
$email = new Emailnotification();
|
||||
$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->setTo($to);
|
||||
$email->setHeader("X-".ucfirst(MFAPPNAME)."-mnid", $this->id);
|
||||
$email->setHeader("X-".ucfirst(MFAPPNAME)."-mtdid", $this->id);
|
||||
if(count($attachments)) {
|
||||
foreach($attachments as $file) {
|
||||
$email->addAttachment($file["path"], null, $file["filename"], $file['mimetype']);
|
||||
|
||||
Reference in New Issue
Block a user