mirror of
https://github.com/itflow-org/itflow
synced 2026-11-21 03:47:25 +00:00
Pasted pictures go with ticket emails as pictures attached inline: emailInlineImages takes each data image out of an email's HTML to uploads/tmp/mail_images, stored once by its hash, and points it at a cid that the mail queue attaches with addEmbeddedImage, so mail programs that show no data images show them and the queue keeps each picture once rather than in every email; Admin Mail Queue shows them back in the message and counts only files as attachments, a meeting request with pictures goes as an attached invite, and nightly removes pictures no queued email uses; 26.11.9 changelog entries
This commit is contained in:
@@ -285,8 +285,8 @@ function sendQueueEmail(
|
||||
// A calendar invitation or cancellation goes in as its own text/calendar part
|
||||
// beside the HTML - the way calendar apps send them, and the only way Outlook
|
||||
// shows one as a meeting rather than a file. PHPMailer only builds that part
|
||||
// when there are no file attachments, so anything else (and a published
|
||||
// event to add) travels as an attached invite.ics.
|
||||
// when there are no file attachments or pictures in the message, so anything
|
||||
// else (and a published event to add) travels as an attached invite.ics.
|
||||
if (!empty($ics_str)) {
|
||||
if (preg_match('/^METHOD:(REQUEST|CANCEL)\r?$/m', $ics_str) && empty($attachments_json)) {
|
||||
$mail->Ical = $ics_str;
|
||||
@@ -318,7 +318,12 @@ function sendQueueEmail(
|
||||
continue;
|
||||
}
|
||||
|
||||
$mail->addAttachment($attachment_path, basename($attachment['name']));
|
||||
// A picture that was in the message as data goes in inline, where its cid: points (emailInlineImages())
|
||||
if (!empty($attachment['cid'])) {
|
||||
$mail->addEmbeddedImage($attachment_path, (string) $attachment['cid'], basename($attachment['name']));
|
||||
} else {
|
||||
$mail->addAttachment($attachment_path, basename($attachment['name']));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user