What happens if the email contains multiple text parts or multiple HTML parts? Does SendGrid concatenate them into a single text string and a single HTML string?
If an email has multiple parts and the parts use different character sets, does SendGrid convert each part to a common character set? It seems like you would have to but I just wanted to confirm.
Is the charset always specified in each part of the multipart payload? I assume it is but I haven't checked. Is it always UTF-8 (other than attachment data, of course)?
And is the charsets field the character set of the data in the payload? Or the character set that was used by the original email?
Thanks! And please let me know if I can clarify these questions in any way.
Hello @mdoliner-st,
regarding the issues you have with charsets. I also found them a bit under-documented by sendgrid but here is how we handle it at the moment and it seems to be right:
After reading through Inbound Parse Webhook documentation I have some minor questions about how the
text
andhtml
fields are populated:charsets
field the character set of the data in the payload? Or the character set that was used by the original email?Thanks! And please let me know if I can clarify these questions in any way.