2012-03-04 113 views
1

我们使用Amazon SES发送电子邮件,它表示我们的最大发送速率是每秒5个。亚马逊SES最大发送速率

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

我们有一个超过1000人的邮件列表,他们都试图一次全部发送(并且我们被批准使用亚马逊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) 
      { 

      } 
     } 
    } 
} 

回答

2

因为我已经找到了答案,他们将被拒绝。

+2

你能告诉你在哪里找到这个信息吗? – MatteoSp 2013-04-08 12:34:20

+1

不,他们没有。阅读此:http://sesblog.amazon.com/post/Tx8YGT0YZ9SQLD/What-Happens-When-You-Reach-Your-Sending-Limits – cawecoy 2013-06-12 23:04:25

+0

他们绝对不排队他们,你会得到一个错误信息抛出如果你超过最大发送速率.... – 2013-07-19 16:46:22

2

我认为请求被拒绝如果我们试图每秒发送更多的消息,然后允许的限制。

我发现这个在SES博客http://sesblog.amazon.com/post/TxKR75VKOYDS60/How-to-handle-a-quot-Throttling-Maximum-sending-rate-exceeded-quot-error

当你调用亚马逊SES超过最高分配的发送速度快,亚马逊SES将拒绝你超过这个限制要求与“节流 - 最大发送速率超过“错误。

“节流 - 超过最大发送速率”错误是可以回溯的。此错误与Amazon SES返回的其他错误不同,例如从未验证的电子邮件地址发送或发送至列入黑名单的电子邮件地址。 这些错误表明请求不会以当前格式接受。拒绝发生“限制”错误的请求可以稍后重试并可能成功。

如果他们排队请求这将是一个很好的选择,但我们的经验是,他们没有。如果我在这里了解到错误,请告诉我。