Gabe Timm
Gabe Timm

Reputation: 102

SendGrid dynamicTemplateData - HTML content and plaintext content in one email?

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?

Upvotes: 0

Views: 833

Answers (1)

philnash
philnash

Reputation: 73029

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

Upvotes: 2

Related Questions