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.
Forcing quoted-printable on text/plain-part
Moderators: Chris Corbyn, General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
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().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.
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.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
I see... I haven't ever seen this. Adding the option is trivial anyway -- another change to put on my list for tonight.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.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Try downloading 2.1.17 which I've just put up and then call:

Code: Select all
$swift->setHeaderEncoding('QP');