Page 1 of 1
Forcing quoted-printable on text/plain-part
Posted: Tue Oct 17, 2006 6:23 am
by joho
How do I force the text/plain-part to be encoded using quoted-printable instead of 8bit encoding?
I've tried passing 'text/plain' and 'quoted-printable' as the second and third parameters to the addpart()-method, but as soon as the text contains 8bit characters (åäö), Swift insists on 8bit encoding, which I don't want.
Posted: Tue Oct 17, 2006 6:30 am
by joho
OK; I found out that if I set the last parameter to the send()-method to 'quoted-printable', I almost get what I want. The stuff is encoded as qp, with the exception of the subject, which still seems to be base64-(en)coded.
Posted: Tue Oct 17, 2006 7:24 am
by Chris Corbyn
joho wrote:OK; I found out that if I set the last parameter to the send()-method to 'quoted-printable', I almost get what I want. The stuff is encoded as qp, with the exception of the subject, which still seems to be base64-(en)coded.
Don't pass a body to send() if you're using addPart() or the parts you add will be ignored in favour of the body passed to send().
Headers are done with base64 currently. That can't be adjusted externally although I don't see a big harm in changing things to allow it to be specified. Many SMTP servers still can't handle true 8-bit submissions so they require a 7-bit transfer encoding to be used.
Posted: Tue Oct 17, 2006 8:46 am
by joho
I'm passing FALSE to send in my latest trial (where I want to set the encoding).
The problem is that we've run into some oddball implementations that cannot handle base64-encoded subjects and what not, thus the need (want) to use qp.
Posted: Tue Oct 17, 2006 9:02 am
by Chris Corbyn
joho wrote:I'm passing FALSE to send in my latest trial (where I want to set the encoding).
The problem is that we've run into some oddball implementations that cannot handle base64-encoded subjects and what not, thus the need (want) to use qp.
I see... I haven't ever seen this. Adding the option is trivial anyway -- another change to put on my list for tonight.
Posted: Tue Oct 17, 2006 6:33 pm
by Chris Corbyn
Try downloading 2.1.17 which I've just put up and then call:

Posted: Wed Oct 18, 2006 2:38 am
by joho
Nice one; tested and confirmed. Thanks.