如何在Amazon SES SendRawEmail中添加Cc和Bcc? [英] How to add Cc and Bcc in Amazon SES SendRawEmail?

查看:1326
本文介绍了如何在Amazon SES SendRawEmail中添加Cc和Bcc?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在sendrawemail(java)中添加Cc和Bcc收件人列表。我只是将所有收件人添加到一个列表并发送邮件。没有单独的方法为SendRawEmailRequest设置Cc和Bcc。

How to add the list of Cc and Bcc recipients in sendrawemail (java). I'm just adding all the recipients to one list and sending the mail. There is no separate method to set Cc and Bcc for SendRawEmailRequest.

有没有办法设置目标类型的对象?

Is there any way to set object of Destination type?

List<String> receipients = new ArrayList<String>();
receipients.addAll(mailToRecipients);
receipients.addAll(mailCcRecipients);
receipients.addAll(mailBccRecipients);

SendRawEmailRequest rawEmailRequest = new   SendRawEmailRequest(rawMessage).withDestinations(receipients);


推荐答案

关于 SendRawEmail < a>,您应该能够通过在原始邮件头中设置To,Cc和Bcc目标来区分。如果您没有在请求对象中明确指定目的地,则会检查标题。如果你这样做,标题将不会被检查。

Regarding SendRawEmail, you should be able to differentiate To, Cc, and Bcc destinations by setting them in your raw message headers. If you don't explicitly specify destinations in the request object, the headers will be checked instead. If you do, the headers won't be checked.

这是一个关于JustinC @ AWS在AWS论坛上分享的这个问题的好例子:

Here's a great example regarding this problem that JustinC@AWS shared on the AWS forums:


   Destinations: (empty)
   To: A@example.com
   Cc: B@example.com
   Bcc: C@example.com

上述消息将发送到A @,B @,C@example.com中的所有三个。
相比之下,如果您发送以下输入:

The above message will be sent to all three of A@, B@, C@example.com. In contrast, if you send the following input:

   Destinations: A@example.com
   To: A@example.com
   Cc: B@example.com
   Bcc: C@example.com

该邮件只会传递给A@example.com。

That message will be delivered only to A@example.com.

这篇关于如何在Amazon SES SendRawEmail中添加Cc和Bcc?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆