alf.krause 0 Posted May 25 (edited) How can I MIME encode the subject and sender (RFC2047)? Some providers now require this, for example, web.de. https://postmaster.web.de/en/case?c=r0710 This case: In case you use Non-ASCII characters like accented letters or symbols, please consider RFC 2047. For these characters you must use MIME encoding. As soon as the corrections have been made by you, you can deliver emails to our system again. Edited May 25 by alf.krause Share this post Link to post
Angus Robertson 656 Posted May 26 Email headers are inline MIME encoded, using HdrEncodeInLine in the OverbyteIcsMimeUtils unit, there are a lot of options for character sets, Q or B encoding, and how to wrap or fold long lines. Look at the OverbyteIcsMimeDemo sample, this illustrates how to use HdrEncodeInLine and other similar MIME encoding and decoding functions. Angus Share this post Link to post
alf.krause 0 Posted May 27 (edited) Thank's, it works for the subject but not for the HdrFrom (RFC2047) Non ASCII Characters - take a look to the link Edited May 27 by alf.krause Share this post Link to post
Angus Robertson 656 Posted May 28 So you are saying that: Smtp.FromName := HdrEncodeInLineEx((MyStr, SpecialsRFC822, 'Q', CP_UTF8, 72, false); does not encode the name? It does seem the email samples don't actually use inline encoding, and perhaps it should be handled by the SMPT component, since we all use unicode compilers nowadays and expect strings to be converted properly. If I can make that work in a backward compatible way, I'll look at adding it to ICS. Angus Share this post Link to post