sendgrid - 如何使用 Sendgrid 引用和创建动态电子邮件?
问题描述
我对这里的文档一无所知。
我正在尝试创建一个基本的 hello world 电子邮件模板,并带有一些简单的电子邮件替换 - 我无法弄清楚语法。
此处的文档建议使用-igetreplaced-
语法,并给出以下示例:
<html>
<head></head>
<body>
<p>Hello -name-,<br>
Thank you for your interest in our products. I have set up an appointment to call you at -time- EST to discuss your needs in more detail. If you would like to reschedule this call, please visit the following link: `<a href="http://example.com/reschedule?id=-customerID-">reschedule</a>`
Regards,
-salesContact-
-contactPhoneNumber-<br>
</p>
</body>
</html>
随附的 SMTP API JSON 标头可能如下所示:
{
"to": [
"example@example.com",
"example@example.com"
],
"sub": {
"-name-": [
"John",
"Jane"
],
"-customerID-": [
"1234",
"5678"
],
"-salesContact-": [
"Jared",
"Ben"
],
"-contactPhoneNumber-": [
"555.555.5555",
"777.777.7777"
],
"-time-": [
"3:00pm",
"5:15pm"
]
}
}
我已经尝试将这些粘贴到模板代码编辑器中,但它不起作用。
有人可以指出正确的文档以使语法正确吗?
解决方案
推荐阅读
- c# - Xamarin Forms - 调用事件“ItemSelected”时使自定义单元格绑定到原始列表视图项目源
- python - 优步 h3 能否以六边形网格覆盖全球?
- javascript - 如何使 ENTER 在 mathlive 中工作并在输入区域中激活 y 方向的自动滚动?
- c# - 手动加载程序集时主线程不退出
- monitoring - Prometheus 工作示例“每个时间范围的请求计数”作为计数器(统计)而不是时间序列
- ruby-on-rails - Rails ActiveAdmin 仅显示视图操作
- python - 将日期字符串转换为日期时间 Python 格式错误
- cookies - AngularApp 未返回 HttpOnly Cookie
- python - AWS SQS 是具有层次关系的任务的正确选择吗?
- python-3.x - 在一个函数中在python中创建多个按钮