限制 ColdFusion 发送到 AWS SES 的数量 emails/second

Limit how many emails/second that ColdFusion sends to AWS SES

我目前在 ColdFusion 11 中的 mail.log 中看到了一堆相同的错误:

com.sun.mail.smtp.SMTPSendFailedException: 454 Throttling failure: Maximum sending rate exceeded.

在完全相同的日期时间有 200 封左右,然后在另一个随机时间有另一批 200 封左右(可能是几个小时后的另一封电子邮件)。

我们正在使用 Amazon SES,我们帐户的最大发送速率为“14 emails/second”。基于我们在 mail.log 中看到的那些错误,我们假设 ColdFusion 试图一次发送太多,超过了这个速率。 这个假设听起来正确吗?

查看 CF 11 管理员,我不确定我们需要进行哪些调整以确保 CF 不超过 14/s 速率。以下是一些我们当前的设置(在 CF Admin > Server Settings > Mail 下)可能适用也可能不适用:

[x] Maintain connection to mail server Connection Timeout (in seconds): 60 [ ] Enable SSL socket connections to mail server [x] Enable TLS connection to mail server

Spool Interval (in seconds): 15 Mail Delivery Threads: 10 [x] Spool mail messages for delivery to: Disk Maximum number of messages spooled to memory: 50000

当邮件传输被 SMTP 服务器拒绝时,ACF 服务器将重新处理这些项目以供将来投递,这将定期重试。因此,您可能不需要添加额外的代码来处理它们,除非您要处理成百上千的电子邮件。

如果后者为真,请向 AWS 请求提高速率限制,或查看另一个提供更高速率的交易电子邮件提供商(例如 - SendGrid)。

另一种选择是 connect directly to the SES API and and use its multi-send options to bypass eliminate the throttling of individual SMTP requests. If the emails being sent are error reports, I would suggest using a separate bug tracking application like Rollbar or BugLogHQ,以消除冗余的事务性错误报告邮件 - 从而释放真正的应用程序事务性消息的限制。