Have converted the templates to use multi-part so that HTML and plain text emails can be generated. The problem I am having is when the following FreeMarker variable is rendered:
for some reason when each of the GET elements, '&pwl=', are added into the URL at rendering time FreeMarker decides to insert the characters 3D in front of them make the URL useless.
For the HTML MIME part I am using the following encoding:
I have tested by sending myself and normal email, as multi-part, and links work fine so it is definitely something to do with the variable rendering. Has anybody else encountered this as I am struggling to find anything on the search engines.
if = are converted to =3D it is because somehow the part gets converted
to quoted-printable content-transfer-encoding. Can you send me your
template so I can check whether there is some quoted-printable somewhere
that should not be there..
Kind regards,
Martijn
···
On 08/08/2012 02:32 PM, Phil Daws wrote:
Hello,
Have converted the templates to use multi-part so that HTML and plain text emails can be generated. The problem I am having is when the following FreeMarker variable is rendered:
for some reason when each of the GET elements, '&pwl=', are added into the URL at rendering time FreeMarker decides to insert the characters 3D in front of them make the URL useless.
For the HTML MIME part I am using the following encoding:
I have tested by sending myself and normal email, as multi-part, and links work fine so it is definitely something to do with the variable rendering. Has anybody else encountered this as I am struggling to find anything on the search engines.
The original template used quoted-printable Content-Transfer-Encoding.
In your template you use 7bit Content-Transfer-Encoding. The URL however
is still quoted-printable'd:
${qp(url)}
If you do not want the url to be quoated printable encoded you should
remove the call to qp, i.e., change it to:
${url}
Same thing for the from.personal name. If using 7bit encoding, you need
to be 100% certain that all characters in the url and personal name are
from the 7bit character set. Since you are also using charset=utf-8 it
suggests you also want to support Unicode. I therefore strongly suggest
you use quoted-printable encoding instead of 7bit (if using
quoted-printable, make sure you encode the = characters from the text
parts).
Kind regards,
Martijn
···
On 08/08/2012 02:42 PM, Martijn Brinkers wrote:
On 08/08/2012 02:32 PM, Phil Daws wrote:
Hello,
Have converted the templates to use multi-part so that HTML and plain text emails can be generated. The problem I am having is when the following FreeMarker variable is rendered:
for some reason when each of the GET elements, '&pwl=', are added into the URL at rendering time FreeMarker decides to insert the characters 3D in front of them make the URL useless.
For the HTML MIME part I am using the following encoding:
I have tested by sending myself and normal email, as multi-part, and links work fine so it is definitely something to do with the variable rendering. Has anybody else encountered this as I am struggling to find anything on the search engines.
if = are converted to =3D it is because somehow the part gets converted
to quoted-printable content-transfer-encoding. Can you send me your
template so I can check whether there is some quoted-printable somewhere
that should not be there..
Brilliant Martijn Sorry it was OT but with your help all is working well. Many thanks.
···
--
Thanks, Phil
----- Original Message -----
On 08/08/2012 02:42 PM, Martijn Brinkers wrote:
> On 08/08/2012 02:32 PM, Phil Daws wrote:
>> Hello,
>>
>> Have converted the templates to use multi-part so that HTML and
>> plain text emails can be generated. The problem I am having is
>> when the following FreeMarker variable is rendered:
>>
>> <#assign
>> url=baseURL+'?id='+passwordID+'&pwl='+passwordContainer.passwordLength+'&email='+recipient?url('UTF-8')+'&ts='+portalInvitation.timestamp?c+'&action=signup&mac='+portalInvitation.mac>
>>
>> for some reason when each of the GET elements, '&pwl=', are added
>> into the URL at rendering time FreeMarker decides to insert the
>> characters 3D in front of them make the URL useless.
>>
>> For the HTML MIME part I am using the following encoding:
>>
>> Content-Type: text/html; charset=utf-8
>> Content-Transfer-Encoding: 7bit
>>
>> I have tested by sending myself and normal email, as multi-part,
>> and links work fine so it is definitely something to do with the
>> variable rendering. Has anybody else encountered this as I am
>> struggling to find anything on the search engines.
>
> if = are converted to =3D it is because somehow the part gets
> converted
> to quoted-printable content-transfer-encoding. Can you send me your
> template so I can check whether there is some quoted-printable
> somewhere
> that should not be there..
Hi Phil,
The original template used quoted-printable
Content-Transfer-Encoding.
In your template you use 7bit Content-Transfer-Encoding. The URL
however
is still quoted-printable'd:
${qp(url)}
If you do not want the url to be quoated printable encoded you should
remove the call to qp, i.e., change it to:
${url}
Same thing for the from.personal name. If using 7bit encoding, you
need
to be 100% certain that all characters in the url and personal name
are
from the 7bit character set. Since you are also using charset=utf-8
it
suggests you also want to support Unicode. I therefore strongly
suggest
you use quoted-printable encoding instead of 7bit (if using
quoted-printable, make sure you encode the = characters from the text
parts).