简体   繁体   English

Sendgrid API - 通过 API 创建 HTML Email 模板

[英]Sendgrid API - Creating HTML Email Template via API

I am not able to figure out how I can create an HTML email template in Sendgrid using the v3 API.我无法弄清楚如何使用 v3 API 在 Sendgrid 中创建 HTML email 模板。

I need to add HTML templates on Sendgrid on the fly on the basis of user input (the user uploads an HTML file the platform which makes an API request to Sendgrid)我需要根据用户输入在 Sendgrid 上动态添加 HTML 模板(用户上传一个 HTML 文件,该平台向 Sendgrid 发出 API 请求)

I need to be able to send the entire HTML (along with Headers and Styles) to Sendgrid for processing these email.我需要能够将整个 HTML(连同标题和样式)发送到 Sendgrid 以处理这些 email。

I am able to send basic HTML tags like paragraphs and headings but not the entire HTML.我可以发送基本的 HTML 标签,例如段落和标题,但不能发送整个 HTML。

Can someone guide me to the right direction?有人可以指导我正确的方向吗?

You need to create a template first & then need to add its version.您需要先创建一个模板,然后再添加它的版本。 Take a reference of create template and then create its version参考创建模板,然后创建其版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM