Closed felixww closed 11 years ago
Does this issue occur in Contao 3.1 as well? If so, how do I reproduce it?
to reproduce, insert an inline image into the standard newsletter template, e.g. the wikipedia example:
<img src="data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGP
C/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IA
AAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1J
REFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jq
ch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0
vr4MkhoXe0rZigAAAABJRU5ErkJggg==" alt="Roter Punkt" />
I think yep, it should persist in 3.1, but cannot test, since i'm on bike holiday.
best, felix
I cannot reproduce the issue. The mail with the red dot was delivered correctly on my system.
Hallo Leo, ich werds mir in der 3.1x noch mal ansehen, sobald ich was besseres als ein Handy habe. Vielleicht hab ich eine Randbedingung uebersehen. Ich wuerd mich freuen, mal was konstruktives zu Contao beizusteuern. Viele Gruesse, Johannes
Version: 3.0.3
Embedded images (using the data:image notation, RFC 2396) do work well in the email template, as long as you send using vanilla mail().
BUT as soon as you configure a SMTP server for the newsletter, a fatal error is thrown for /system/modules/core/library/Contao/Email.php:469 (for calling file_exists with a path containing the whole data:image blob). Also, Swiftmailer fopen will fail later.
I propose the following fix:
468-469: old version:
468-469: fixed version:
...since there's no need to embed an image already embedded.
Works for me with open_basedir both on and off.
(btw. the fix should also apply to Contao 2.11.x, here for /system/libraries/Email.php, line 444.)
Best flx.