发送网格 – 当我使用api发送电子邮件时,收到的电子邮件缺less所有devise,例如只显示文本

发送网格 – 当我使用api发送电子邮件时,收到的电子邮件缺less所有devise,例如只显示文本。

我正在使用javascript的节点js应用程序。

我拥有这一切与API的工作。

我只需要调用模板来包含图像。

是否有某种发送网格设置?

这是我使用的交易电子邮件。 我在下面的代码示例中调用ID。

它调用的模板很好,只是不包括图像和只有文本。

文档示例:

var email = new sendgrid.Email(); email.addTo('example@domain.com'); email.subject = "Send with templates app"; email.from = 'from@example.com'; email.text = 'Hi there!'; email.html = '<h1>Hi there!</h1>'; // add filter settings one at a time email.addFilter('templates', 'enable', 1); email.addFilter('templates', 'template_id', '09c6ab89-9157-4710-8ca4-db7927c631d6'); 

链接到文档: https : //github.com/sendgrid/sendgrid-nodejs

有任何想法吗?

提前致谢。

不要设置email.text,看看是否解决了这个问题。

我换了email.text for email.html,似乎工作。

它必须需要一些HTML标记才能正常工作