使用SendGrid发送100封邮件的最佳方式是什么?每封邮件都有不同的抄送和密件
本文关键字:密件 是什么 发送 SendGrid 最佳 方式 使用 | 更新日期: 2023-09-27 17:50:26
SendGrid通过在X-SMTPAPI Header: http://sendgrid.com/docs/API_Reference/SMTP_API/index.html中添加' to '收件人,可以通过一次调用SMTPAPI向多个收件人发送。
您可以使用替换为每个收件人定制电子邮件的正文:http://sendgrid.com/docs/API_Reference/SMTP_API/substitution_tags.html
但是我找不到为每个收件人发送定制的抄送和密件的方法。我想为每封邮件发送不同的抄送和密件地址。怎么做呢?
谢谢…
无法通过X-SMTPAPI头根据每个消息定制抄送或密件。然而,你可以指定一个密件或抄送,将适用于所有的电子邮件发送。
例如,如果你要发送这样的内容:
"x-SMTPAPI": {
"to": ["user1@example.com", "user2@example.com", ...],
"bcc": ["some.employee1@example.com", "some.employee2@example.com"],
...
}
user1@example.com和user2@example.com都会收到电子邮件,some.employee1@example.com和some.employee2@example.com会收到密件。