Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've configured Amazon SES and obtained the first level of increased sending rate. So my limits are now 10,000 emails/day, 5 emails/second. My question is: do I need to enforce those rates within my own application (i.e. ensure no more than 5 emails are sent to the SMTP server per second) or can I rely on the server queuing any mail beyond the rate and sending it with a delay?

Of course, I recognise the need to still average out to those rates, but I have a function in my app that sends out ~ 1,500 emails in a 'batch', and I just need to know if I need to throttle it, or if I can just let it run through as quickly at it can.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

If you exceed your quota - either your daily quota or your sending rate, you will receive an error message, and the message will not be sent. It will not be queued on the SES side. If a message is accepted by SES it will be sent by them in a fairly short time frame.

This means that you need to build in a bit of delay if your application is sending too fast, and should check your quotas as you send. Alternatively, just wait until you get an error, and then, depending on the error, pause an appropriate amount of time.

The error message will be of the 400 variety, typically 'Maximum sending rate exceeded'. You should reduce the concurrent threads launched by your mailer to accommodate for this. If you are using the ses-send-email.pl script, you can modify it to return a temporary failure when SES sends a 400 error.

Further reading:

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.