小编Ale*_*zur的帖子

通过 SendGrid v3 发送 HTML 内容

我使用 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>"
    }
  ], 
Run Code Online (Sandbox Code Playgroud)

我收到错误:

第400章

但这段代码可以正常工作:

"content": [
    {
      "type": "text/html", 
      "value": "<html><head></head><body>Hello!</body></html>"
    }
  ], 
Run Code Online (Sandbox Code Playgroud)

我认为特殊字符有问题,但我该如何解决它?谢谢你!

email go sendgrid sendgrid-api-v3

9
推荐指数
1
解决办法
2万
查看次数

标签 统计

email ×1

go ×1

sendgrid ×1

sendgrid-api-v3 ×1