[TYPO3-dev] t3lib_htmlmail breaks plaintext version when inline images are attached
Simon Tuck
stu at rtpartner.ch
Fri Aug 14 18:47:46 CEST 2009
Looking for some love here...
I've done some research on the subject and tested the format
t3lib_htmlmail sends on a few other mail clients. I believe that the
definition of the mail structure for "Plain + HTML + image" is wrong in
t3lib_htmlmail. According to t3lib_htmlmail the correct strcture for
"Plain + HTML + image" is:
* multipart/related (m/a, cids)
* multipart/alternative (text, html)
Imo it should be:
multipart/alternative
text/plain
multipart/related
text/html
embedded object one
embedded object two
...
RFC 2257 (http://www.rfc-editor.org/rfc/rfc2557.txt) states:
[...] When the start
body part of a multipart/related structure is a multipart/alternative
structure, and that structure contains at least one alternative body
part which is a suitable atomic object, such as a text/html resource,
then that body part SHOULD be employed as the root resource of the
aggregate document. [...]
In other words the html body part of the multipart/alternative should be
employed as the root resource for the multipart/related and not the
entire multipart/alternative.
See also
http://search.cpan.org/~bbc/Email-MIME-CreateHTML-1.026/lib/Email/MIME/CreateHTML.pm
for an example of a rfc2557 compliant mail construction
More information about the TYPO3-dev
mailing list