Djigzo Templates and Multi-Part

The inner multi part should have a different boundary than the outer part. For the inner part you can choose a static boundary or append some string to the $boundary parameter.

Kind regards,

Martijn Brinkers

···

---
Sent with DJIGZO for Android. Please excuse my brevity.

----- Original message -----
Hi Martijn,

I did indeed think that but was unsure about the ${boundary} variables. When I looked at a multipart/alternative the MIME entities had different boundary identifiers so was unsure whether there was something I need to do with the FreeMarker code to make it work. Will give it a try just using ${boundary}.
--
Thanks, Phil

----- Original Message -----

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

_______________________________________________
Users mailing list
Users(a)lists.djigzo.com
http://lists.djigzo.com/lists/listinfo/users

The inner boundary was the key ... Appreciated.

···

--
Thanks, Phil

----- Original Message -----

The inner multi part should have a different boundary than the outer
part. For the inner part you can choose a static boundary or append
some string to the $boundary parameter.

Kind regards,

Martijn Brinkers

---
Sent with DJIGZO for Android. Please excuse my brevity.

----- Original message -----
Hi Martijn,

I did indeed think that but was unsure about the ${boundary}
variables. When I looked at a multipart/alternative the MIME
entities had different boundary identifiers so was unsure whether
there was something I need to do with the FreeMarker code to make it
work. Will give it a try just using ${boundary}.
--
Thanks, Phil

----- Original Message -----
> 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
>
>
> _______________________________________________
> Users mailing list
> Users(a)lists.djigzo.com
> http://lists.djigzo.com/lists/listinfo/users
>