The image embedding in the email option is not there in the smtp module. The patch exists in https://www.drupal.org/node/2494339 for the Drupal 7 module and it is not there for the Drupal 6 module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Poornachandran created an issue. See original summary.

poornachandran’s picture

Title: Image Embed Attachments for Drupal 6 module » Embed Images inline in Drupal 6 smtp module
poornachandran’s picture

The fix is in the patch which will embed the image in the email using the AddEmbeddedImage function of the PHPMailer

pankajchaudhari’s picture

Tested the patch and embedded the image inline in email template.

pankajchaudhari’s picture

Status: Needs review » Reviewed & tested by the community
vipulsuriya’s picture

Tested in my environment setup and it's working fine.

wundo’s picture

Status: Reviewed & tested by the community » Needs work

Please add some comments :)

PS: How do I test this?

poornachandran’s picture

@wundo
Purpose:

To embed an inline image like <img src="cid:cid_name"> in the email template.

Steps To Reproduce:

  1. Add an image in the email body like <img src="cid:cid_name">.
  2. Add an array in the message array which has been passed to the smtp_drupal_mail_wrapper function like, $message['images'][] = array("filepath" => "image_path", "cid" => "cid_name", "base64");
  3. This will embed the image inline.
poornachandran’s picture

Status: Needs work » Reviewed & tested by the community
poornachandran’s picture

Reviews please on the patch :)

wundo’s picture

Status: Reviewed & tested by the community » Needs work

@Poornachandran I need a re-roll

poornachandran’s picture

@wundo I could apply the patch cleanly. So I think no re roll is needed.

poornachandran’s picture

Status: Needs work » Needs review
poornachandran’s picture

FileSize
1005 bytes

Updated the patch to fix the issue Strict warning: Non-static method PHPMailer::_mime_types() should not be called statically in PHPMailer::_mime_types()

poornachandran’s picture

It is been there for a long time. Some reviews on this please...

wundo’s picture

Status: Needs review » Closed (outdated)