I'm QP encoding (using RFC2047) the mail headers in outgoing emails (from my own application, sending data to SMTP servers)
This works quite well, but some clients do not properly display the results at the receiving end. They just run havoc, displaying the coding itself as addresses.
Troubleshooting, I realize that RFC2047 states that
- An 'encoded-word' MUST NOT appear in any portion of an 'addr-spec'
Is this the problem with my encoding?
When I have a "To" address list like this:
I encode that to:
It works very well with many clients, but some really do not like it.
Would you say that the above is in violation with RFC2047? How should it be encoded to be legal?
In the above example, the only reason for using encoded words is that the line gets too long.
Should I skip encoding completely in this situation, and just add more and more rows to the header? I probably thought (when once implementing this) that encoding was needed to get multi-line header rows...
And if so, how should a address list like this be encoded to be legal:
firstname.lastname@example.org (a strange åäö name);email@example.com;firstname.lastname@example.org;email@example.com;firstname.lastname@example.org (another strange åäö name)