Open smurfpandey opened 10 years ago
The 'Q' encoding used in rfc2047 headers uses underscores to encode spaces for easier legibility. The Content-Transfer-Encoding: quoted-printable encoding does not do this and has other differences as well.
Currently the code uses Utilities.DecodeQuotedPrintable() for both cases and here's where underscores are converted to spaces:
https://github.com/andyedinborough/aenetmail/blob/master/Utilities.cs#L241
As a quick and dirty hack, you could probably modify DecodeQuotedPrintable to take a boolean arg to specify if it should decode underscores and then modify the code that uses it to pass the correct true/false value.
I was aware of this function, but wasn't sure how it works. Will do a quick hack myself now.
I noticed that all underscore characters are getting replaced by a space. We have a workflow where we are reading URL from the email body, but all URLs with underscore are broken after reading via the our app. e.g Actual URL in email:
URL read by the app: