On 08/06/2012 08:29 PM, Phil Daws wrote:
Hello,
does the FreeMarker code that is used within Djigzo allow multi-part templates to be
generated ? I created one and used the following MIME details:
Content-Type: multipart/mixed; boundary="${boundary}"
--${boundary}
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Some random text
--${boundary}
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
<html><head></head><body>Some random
text</body></html>
--${boundary}
Content-Disposition: attachment; filename=encrypted_${passwordID}.pdf
Content-Type: application/pdf; name=encrypted_${passwordID}.pdf
Content-Transfer-Encoding: base64
X-Djigzo-Marker: attachment
--${boundary}
but when viewed in an email client both plain and HTML versions were shown.
That's because you should use a multipart/alternative if you either want
to show a html or text body. Since you also want an attachment you
should make the outer content type multipart/mixed and the inner body
content a multipart/alternative. I suggest you send yourself a message
with an html part and an alternative text part and an attached message
so you can see how the MIME message is organized.
Kind regards,
Martijn
--
DJIGZO email encryption