SendGrid未将文本发送到换行符 [英] Sendgrid not sending text to new line

查看:33
本文介绍了SendGrid未将文本发送到换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将SendGrid API与NodeJS一起使用,由于某些原因,电子邮件正在发送,但没有添加新行。我用过了,而且 但运气不佳。知道出了什么问题吗?

以下是我使用的代码

var email = {
      to: 'test@gmail.com',
      from: 'hello@test.com',
      subject: 'Membership',
      text: 'Please view in html',
      html: 'Hello there!,</br>

' +
      'Please click on the following link, or paste this into your browser to complete the process:

' +
      'Welcome and thanks for joining.

' +
      '</br>Your details we have are

' +
      '</br> Name: ' + user + '

' + '</br> Telephone number: ' + number + '</br> email: ' + email + '</br>'
      };

推荐答案

我假定您的";普通内容&设置已在SendGrid帐户中关闭。 要使html标记起作用,您需要使用三花括号

{{{TEMPLATE_VARIABLE}}}

它会将html标记解析为html而不是纯文本。如果您要使用双花括号

{{TEMPLATE_VARIABLE}}

它将把任何html标记仅视为纯文本。

这篇关于SendGrid未将文本发送到换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆