mail icon indicating copy to clipboard operation
mail copied to clipboard

Handle incomptible encodings in email headers

Open bobjflong opened this issue 5 years ago • 4 comments

Previously, running this new test case would throw an Encoding::CompatibilityError error, as it attempts to join the parsed ASCII-8BIT string and parsed UTF-8 string together.

Now, if a set of incompatible encodings is detected, we first force the strings to be UTF-8, and replace invalid characters.

Let me know if there are other thoughts on how to handle this error.

bobjflong avatar Jan 20 '20 19:01 bobjflong

any updates here? and what should be the correct behaviour? I'm running similar issue with message-id header

sakirtemel avatar Nov 09 '21 18:11 sakirtemel

@bobjflong thanks for this. Wondering what real world case would exist where you are inserting incompatible strings? Would we get this from an incoming email or is this only really possible when you are using mail in a program you control?

mikel avatar Dec 03 '22 09:12 mikel

cc @sakirtemel

mikel avatar Dec 03 '22 09:12 mikel

@mikel as far as I remember it was happening when we were receiving an incoming email for our case. I've seen many of those happening and they were failing in our queues.

sakirtemel avatar Dec 03 '22 17:12 sakirtemel