Home > Blockchain >  SendGrid dynamicTemplateData - HTML content and plaintext content in one email?
SendGrid dynamicTemplateData - HTML content and plaintext content in one email?

Time:12-16

I'm trying to figure out how to send a plain text version of my email, alongside the html content generated by dynamicTemplateData and my dynamic template.

Including text as a sibling to dynamicTemplateData results in a broken email.

It looks like SendGrid is including a text/plain email alongside the text/html content, but it's empty.

Does anybody know how to inject a text/plain version of my email?

CodePudding user response:

Twilio SendGrid developer evangelist here.

When you preview your dynamic template, you can check it out in Desktop, Mobile and Plain Text versions. You can set SendGrid to automatically create a plain text version of the email from your HTML variant, or you can choose to write your own plain text version.

See the screenshot below for more detail:

enter image description here

  • Related