I'm working on an Exchange (2013) gateway that writes eml files into the replay folder.
When the EmailMessage Subject property contains non iso-8859-1 characters, those characters are written to the eml file as "?".
Debugging into the code, the EmailMessage Subject property contains the correct Unicode string. For example:
"Arabic ضطع Text"
However, when the eml file is written, the Subject header is:
Subject: =?iso-8859-1?Q?Arabic_=3F=3F=3F_Text?=
I'd have expected the subject to have utf8 or the Arabic 8859 code page encoding since the subject property contained Arabic characters, but clearly it's defaulting to some other conversion.
How do I control the subject encoding?