Amazon SES(简单电子邮件服务)用于批量电子邮件,而不是事务性电子邮件?

发布于 2024-10-15 08:44:27 字数 1805 浏览 8 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

桃气十足 2024-10-22 08:44:27

文档现在明确指出您最多可以添加 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.

怪异←思 2024-10-22 08:44:27

如果您查看API 参考,您肯定可以发送至每个请求一次有多个帐户。

SendEmail 需要“Destination”类型的“Destination”参数。

Destination 具有三个属性:ToAddresses、CCAddresses、BCCAddresses - 所有属性都是“字符串列表”类型。

如果您查看开发人员指南中的示例请求,您会看到它将目标地址指定为类似于以下内容的参数:

&Destination.ToAddresses.member.1=allan%40example.com

我将冒险并猜测他们期望多个的“字符串列表”地址格式类似于:

&Destination.ToAddresses.member.1=allan%40example.com
&Destination.ToAddresses.member.2=other%40example.com
&Destination.ToAddresses.member.3=asdfq%40example.com
...
&Destination.ToAddresses.member.1000=final%40example.com

我实际上偶然发现了你的问题,正在寻找我自己关于 SES 的一些问题的答案 - 到目前为止,文档已经足够完整,可以使用,但并不总是非常有帮助 - 你经常必须做出一些有趣的推论得到答案——只是给你一个公平的警告!

干杯!

编辑:我可能从您在自我回答中发布的引用中提取出另一件事:

通过修改软件以直接调用 Amazon SES,或将其重新配置为通过 Amazon SES SMTP 中继传送电子邮件,如上所述。

如果您设置自己的 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:

&Destination.ToAddresses.member.1=allan%40example.com

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:

&Destination.ToAddresses.member.1=allan%40example.com
&Destination.ToAddresses.member.2=other%40example.com
&Destination.ToAddresses.member.3=asdfq%40example.com
...
&Destination.ToAddresses.member.1000=final%40example.com

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:

either by modifying the software to directly call Amazon SES, or reconfiguring it to deliver email through an Amazon SES SMTP relay as described above.

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.

简单气质女生网名 2024-10-22 08:44:27

谢谢核狗,
经过进一步审查,我认为问题的答案是重复调用 api x 次(下面来自 SES FAQ)。

假设我们要发送 20 万封邮件。首先,我很想知道我们可以在一封邮件中添加多少个“收件人地址”的实际限制。一旦我们知道了这一点,我们就可以一次批量发送 100 个左右的“ToAddresses”。

其次,与大多数批量邮件一样,每个收件人的内容略有不同,即使只是“你好”介绍。鉴于邮件正文虽然相似,但每封电子邮件都会有个性化,我相信我们的期望只是一遍又一遍地调用 api。我在想也许有某种方法可以通过一次调用对多封电子邮件进行排队,然后进行发送,但考虑到 API 的性质,这可能不现实。

SES 可能旨在使用 Amazon AWS 数据库产品之一以这种方式提高可扩展性。

现在,我认为我必须实现一个队列或消息系统来高效地调用 api X 次,以便所有 api 调用 1)不会花费一整天,2)不会对我们的系统造成太大负担。

问:我可以使用 Amazon SES 批量发送吗
电子邮件?是的。只需调用 SendEmail
或重复发送RawEmail API
您想要发送的每封电子邮件。
在 Amazon EC2 上运行的软件,Amazon
Elastic MapReduce,或您自己的服务器
可以撰写和发送批量电子邮件
以任何最佳方式通过 Amazon SES
适合您的业务。如果你已经
有自己的群发邮件软件,
更新交付很容易
通过 Amazon SES – 或者通过
直接修改软件即可
调用 Amazon SES,或重新配置它
通过 Amazon SES 发送电子邮件
SMTP 中继如上所述。

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.

Q: Can I use Amazon SES to send bulk
email? Yes. Simply call the SendEmail
or SendRawEmail APIs repeatedly for
each email you would like to send.
Software running on Amazon EC2, Amazon
Elastic MapReduce, or your own servers
can compose and deliver bulk emails
via Amazon SES in whatever way best
suits your business. If you already
have your own bulk mailing software,
it’s easy to update it to deliver
through Amazon SES – either by
modifying the software to directly
call Amazon SES, or reconfiguring it
to deliver email through an Amazon SES
SMTP relay as described above.

梦醒灬来后我 2024-10-22 08:44:27

您可以使用他们的简单队列服务发送批量电子邮件。

You can use their Simple Queue Service to send bulk email.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文