【发布时间】:2017-02-16 09:59:41
【问题描述】:
我使用 GO 并尝试通过 sendgrid API v3(https://github.com/sendgrid/sendgrid-go 没有邮件帮助程序类)发送邮件。但是当我使用这段代码时:
"content": [
{
"type": "text/html",
"value": "<html><head></head><body>Hello You link <a href="http://example.com/reschedule?id=12334">Click</a></body></html>"
}
],
我得到错误:
400 {"errors":[{"message":"Bad Request","field":null,"help":null}]}
但是这段代码可以正常工作:
"content": [
{
"type": "text/html",
"value": "<html><head></head><body>Hello!</body></html>"
}
],
我认为特殊字符有问题,但我该如何解决?谢谢!
【问题讨论】:
-
问题可能是你的
value里面的",你必须把&quot;放在里面
标签: go sendgrid email sendgrid-api-v3