Problem

If you use the same image more than one time in swiftmailer theme using the image:$path format, file gets embedded multiple times. This causes message to be larger than it should be. Some e-mail readers treat additional embedded images as attachments as they are never used in the message body.

Steps to reproduce

  • Cretate mail template with 2 or more <img> tags using the image:$path format and the same $path.
  • Send mail :)

Proposed resolution

I've created simple fix for the issue, see patch attached. Works for me.

Remaining tasks

I've not created any tests for that so fix needs review/testing.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sbrattla’s picture

Thanks, indeed a good point I haven't really put any thought into. I'll try to get your fix applied very soon.

mwysinski’s picture

Thank you.

If you want I can help you with maintaining this module. I'm quite experienced in building mime mails in php and I'm thinking of getting more engaged in the drupal community.

Let me know what you think about it.

sbrattla’s picture

Assigned: Unassigned » sbrattla
Status: Active » Closed (fixed)

Applied and commited. Thanks!

Sorry for my huge delay in getting back to you. Are you still interested in becoming a maintainer?

webflo’s picture

Version: 7.x-1.5 » 8.x-1.x-dev
Status: Closed (fixed) » Needs review
FileSize
1.12 KB
webflo’s picture

Status: Needs review » Fixed

  • webflo committed 3f6b0df on 8.x-1.x
    Issue #2176873 by mwysinski, webflo: If the same inline image used...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.