Embed attached images of Notification html message as inline image

This commit is contained in:
Hadi Nategh 2017-10-27 19:03:54 +02:00
parent 2abb69f712
commit b0a4ab3b7c

View File

@ -104,6 +104,11 @@ class notifications_email implements notifications_iface {
$this->mail->setFrom($this->sender->account_email, $this->sender->account_fullname); $this->mail->setFrom($this->sender->account_email, $this->sender->account_fullname);
$this->mail->addHeader('Subject', trim($_subject)); // trim the subject to avoid strange wrong encoding problem $this->mail->addHeader('Subject', trim($_subject)); // trim the subject to avoid strange wrong encoding problem
if ($_messages['html'])
{
// embed images as inline
\EGroupware\Api\Mail::processURL2InlineImages($this->mail, $body_html, null);
}
$this->mail->setHtmlBody($body_html, null, false); // no automatic alternativ $this->mail->setHtmlBody($body_html, null, false); // no automatic alternativ
$this->mail->setBody($body_plain); $this->mail->setBody($body_plain);