We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
The community reviewed whether to reopen this question last year and left it closed:
Original close reason(s) were not resolved
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
文档现在明确指出您最多可以添加 50 个收件人每条消息。这样您就可以分批划分发件人列表;对于 20 万个收件人,您将必须进行 4k 个 API 调用。对于批量邮件来说不太方便;我猜亚马逊并没有将他们的服务定位于这种特殊用途。
The docs now clearly state that you can add up to 50 recipients per message. So you can divide up your sender list in batches; for 200k recipients you would have to make 4k API calls. Not terribly convenient for bulk mails; I would guess Amazon is not orienting their service for this particular use.
如果您查看API 参考,您肯定可以发送至每个请求一次有多个帐户。
SendEmail 需要“Destination”类型的“Destination”参数。
Destination 具有三个属性:ToAddresses、CCAddresses、BCCAddresses - 所有属性都是“字符串列表”类型。
如果您查看开发人员指南中的示例请求,您会看到它将目标地址指定为类似于以下内容的参数:
我将冒险并猜测他们期望多个的“字符串列表”地址格式类似于:
我实际上偶然发现了你的问题,正在寻找我自己关于 SES 的一些问题的答案 - 到目前为止,文档已经足够完整,可以使用,但并不总是非常有帮助 - 你经常必须做出一些有趣的推论得到答案——只是给你一个公平的警告!
干杯!
编辑:我可能从您在自我回答中发布的引用中提取出另一件事:
如果您设置自己的 SMTP 服务器,并且只是让它中继/转发通过 SES,这可能会处理您的排队等问题。您只需发送几千封电子邮件,您的 SMTP 服务器就会在邮件到达亚马逊之前处理排队等问题。
If you take a look in the API reference it would certainly look like you can send to more than one account at a time per request.
SendEmail requires an argument of 'Destination' of type 'Destination'.
Destination has three properties: ToAddresses, CCAddresses, BCCAddresses - all are of type "string list".
If you look at the example requests in the Developer Guide, you'll see it specified the destination addresses as an argument similar to:
I'm going to go out on a limb and guess for a 'string list' they're expecting multiple addresses in a format similar to:
I actually stumbled across your question looking for answers to some of my own questions about SES - as of yet the docs are complete enough to use, but not always terribly helpful - you often have to make some fun inferences to get answers - just a fair warning for you!
Cheers!
Edit: One other thing that might be possible I pulled from the quote you posted in your self-answer:
If you set up your own SMTP server, and just have it relay/forward through SES, that might handle your queuing/etc. You can just shoot out a few thousand e-mails and your SMTP server will handle queuing/etc before it hits Amazon.
谢谢核狗,
经过进一步审查,我认为问题的答案是重复调用 api x 次(下面来自 SES FAQ)。
假设我们要发送 20 万封邮件。首先,我很想知道我们可以在一封邮件中添加多少个“收件人地址”的实际限制。一旦我们知道了这一点,我们就可以一次批量发送 100 个左右的“ToAddresses”。
其次,与大多数批量邮件一样,每个收件人的内容略有不同,即使只是“你好”介绍。鉴于邮件正文虽然相似,但每封电子邮件都会有个性化,我相信我们的期望只是一遍又一遍地调用 api。我在想也许有某种方法可以通过一次调用对多封电子邮件进行排队,然后进行发送,但考虑到 API 的性质,这可能不现实。
SES 可能旨在使用 Amazon AWS 数据库产品之一以这种方式提高可扩展性。
现在,我认为我必须实现一个队列或消息系统来高效地调用 api X 次,以便所有 api 调用 1)不会花费一整天,2)不会对我们的系统造成太大负担。
Thanks NuclearDog,
Upon further review, I think the answer to the question is to call the api repeatedly, x times (below from the SES FAQ).
Lets say we are sending out 200K mailings. First, I would be very interested to know the realistic limit for how many "ToAddresses" we can tack on to one mailing. Once we know that, we could maybe batch sends into groups of 100 or so "ToAddresses" at a time.
Second, as with most bulk mailings, the content is slightly different per recipient, even if it is just a "Hello ," intro. Given that the mailing body will, while similar, will have personalization per email, I believe the expectation is simply to call the api over and over. I was thinking perhaps there would be some way to queue up multiple emails with one call, then do a send, but this is likely not realistic given the nature of the API.
SES is probably intended to be a bit more scalable in this fashion using one of the Amazon AWS database products.
For now, I think I would have to implement a queue or message system to call the api X times in an efficient so that all the api calls 1) don't take all day, and 2) don't tax our systems too much.
您可以使用他们的简单队列服务发送批量电子邮件。
You can use their Simple Queue Service to send bulk email.