Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Inline images were not being rendered in HTML emails and I could find no code implementing function MsgHTML() of smtp.phpmailer.inc, so I altered function mail() of smtp.mail.inc to replace this:
case 'text/html':
// The message includes only an HTML part.
$mailer->IsHTML(TRUE);
$content_type = 'text/html';
break;
with this:
case 'text/html':
// The message includes only an HTML part.
$mailer->IsHTML(TRUE);
$content_type = 'text/html';
$mailer->MsgHTML($body);
$body = $mailer->Body;
break;
Am I doing the right thing in the right place (just 'cos it works doesn't mean that it's the correct answer)? Let me know and I'll roll proper patches for D7 beta2 and dev.
Comments
Comment #1
Simon Georges CreditAttribution: Simon Georges commentedCross-referencing #1813164: Mime Mail -> SMTP with embedded images.
Comment #2
Simon Georges CreditAttribution: Simon Georges commentedCould you eventually test the (soon to be released) -dev version, as a few things have been fixed since then?
Comment #3
wundo CreditAttribution: wundo at Chuva Inc. commentedClosing very old (dead) issues, if you think this is still relevant please re-open.