我在我的Rails应用程序中使用Sendgrid来发送电子邮件。我收到一封来自Sengrid的电子邮件,说:
We’re emailing you with an update concerning the retirement of the BCC feature of our Email API. Our records show that you are still using the BCC feature.
If our previous correspondence regarding the removal of BCC did not make it your way, we apologize. We strive to provide thorough communication and ample warning of feature deprecations and removals. We recognize the change caught some customers by surprise.
To help you make any necessary changes to your sends, the BCC feature under settings will be available until June 22nd, 2020. This feature is now unavailable from the UI and only accessible via API call. We understand that removing a service or feature requires time on the part of our customers, and we hope that extending the availability of BCC is helpful.
Again, the BCC feature will be fully removed June 22nd, 2020.
从现在开始,如何在 Sendgrid 中使用密件抄送功能?
Ruby APi 的个性化对象可以完成这项工作。它将允许您以编程方式设置密件抄送。
我在 Java 应用程序中进行了所需的更新,如下所示。
final Personalization mailPersonalize = new Personalization();
mailPersonalize.addBcc(yourBcc);
final Request request = new Request();
final Mail mail = new Mail();
mail.addPersonalization(mailPersonalize);
request.setBody(mail.buildPretty());
final Response response = sendGrid.api(request);
如果使用个性化设置密件抄送,请将其删除,因为它将被弃用。我希望这会有所帮助。