You need to sign in to do that
Don't have an account?

Email Services: blank Content-Transfer-Encoding header causes exception
We are seeing some real-world emails that Email Services cannot handle, instead generating an error message:
554 Error processing email content Error ID=1753825505-222 (1527040629)
Emails that cause this error have a blank Content-Transfer-Encoding header in the text & html parts:
Date: Thu, 4 Apr 2013 19:32:24 -0400 MIME-Version: 1.0 Message-ID: <456cff6ec6ae70ac0bae49733e680ea3@dp1.example.com> To: <to@example.com> From: <from@example.com> Subject: test subject Content-Type: multipart/alternative; boundary="Alexandria=_d516e2a0981b50e1fbf77c61de0bd050" --Alexandria=_d516e2a0981b50e1fbf77c61de0bd050 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: text body --Alexandria=_d516e2a0981b50e1fbf77c61de0bd050 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <body> html body </body> </html> --Alexandria=_d516e2a0981b50e1fbf77c61de0bd050--
Email Services handles the email just fine if you simply remove the header:
Date: Thu, 4 Apr 2013 19:32:24 -0400 MIME-Version: 1.0 Message-ID: <456cff6ec6ae70ac0bae49733e680ea3@dp1.example.com> To: <to@example.com> From: <from@example.com> Subject: test subject Content-Type: multipart/alternative; boundary="Alexandria=_d516e2a0981b50e1fbf77c61de0bd050" --Alexandria=_d516e2a0981b50e1fbf77c61de0bd050 Content-Type: text/plain; charset="utf-8" text body --Alexandria=_d516e2a0981b50e1fbf77c61de0bd050 Content-Type: text/html; charset="utf-8" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <body> html body </body> </html> --Alexandria=_d516e2a0981b50e1fbf77c61de0bd050--
A minor bug, but Email Services should be able to handle almost any email that is "roughly valid". The world of email is wild & wooly and full of messages that are nonconforming in minor ways like this, and Email Services should be ready to handle them.
Salesforce support: I have created case 09011561 to track this issue.
https://success.salesforce.com/issues_view?id=a1p30000000Szl4AAC
All Answers
Note: an incorrect Content-Transfer-Encoding header will cause the exact same error.
So this will throw the same error: (notice the dash in "8-bit"):
But getting rid of the dash works fine:
While this sounds contrived, we actually see a couple examples of this per week.
https://success.salesforce.com/issues_view?id=a1p30000000Szl4AAC