gpt4 book ai didi

email - Amazon SES 最大发送速率

转载 作者:行者123 更新时间:2023-12-01 09:35:06 26 4
gpt4 key购买 nike

我们正在使用 Amazon SES 发送电子邮件,它说我们的最大发送速率是每秒 5 次。

我查不到的是如果我们每秒发送超过 5 个会发生什么? 他们排队还是被拒绝?

我们有一个邮件列表,上面有 1,000 多人,他们都尝试一次性发送所有邮件(我们已获准为此使用 Amazon SES)。

这是我用来发送电子邮件的代码:

namespace Amazon
{
public class Emailer
{
/// <summary>
/// Send an email using the Amazon SES service
/// </summary>
public static void SendEmail(String from, String To, String Subject, String HTML = null, String emailReplyTo = null, String returnPath = null)
{
try
{
List<String> to
= To
.Replace(", ", ",")
.Split(',')
.ToList();

var destination = new Destination();
destination.WithToAddresses(to);

var subject = new Content();
subject.WithCharset("UTF-8");
subject.WithData(Subject);

var html = new Content();
html.WithCharset("UTF-8");
html.WithData(HTML);

var body = new Body();
body.WithHtml(html);

var message = new Message();
message.WithBody(body);
message.WithSubject(subject);

var ses = AWSClientFactory.CreateAmazonSimpleEmailServiceClient("xxx", "xxx");

var request = new SendEmailRequest();
request.WithDestination(destination);
request.WithMessage(message);
request.WithSource(from);

if (emailReplyTo != null)
{
List<String> replyto
= emailReplyTo
.Replace(", ", ",")
.Split(',')
.ToList();

request.WithReplyToAddresses(replyto);
}

if (returnPath != null)
request.WithReturnPath(returnPath);

SendEmailResponse response = ses.SendEmail(request);

SendEmailResult result = response.SendEmailResult;
}
catch (Exception e)
{

}
}
}
}

最佳答案

我认为请求被拒绝 如果我们试图每秒发送更多消息,则是允许的限制。
我在 SES 博客中找到了这个 http://sesblog.amazon.com/post/TxKR75VKOYDS60/How-to-handle-a-quot-Throttling-Maximum-sending-rate-exceeded-quot-error

When you call Amazon SES faster than your maximum allocated send rate, Amazon SES will reject your over the limit requests with a "Throttling – Maximum sending rate exceeded" error.

A "Throttling – Maximum sending rate exceeded" error is retriable. This error is different than other errors returned by Amazon SES, such as sending from an email address that is not verified or sending to an email address that is blacklisted. Those errors indicate that the request will not be accepted in its current form. A request rejected with a "Throttling" error can be retried at a later time and is likely to succeed.


如果他们将请求排队,这将是一个不错的选择,但我们的经验是他们不会。如果我在这里理解错误,请告诉我。

关于email - Amazon SES 最大发送速率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9558611/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com