[英]Rails ActionMailer add a delay for few milliseconds before sending an email
Is there a way to achieve above at a single place, as we have lot of places to send email and can't change email sending calls to add a delay through out the application code base. 有没有一种方法可以在一个地方实现上述目标,因为我们有很多地方可以发送电子邮件,并且不能更改电子邮件发送呼叫以增加整个应用程序代码库的延迟。
We just want to make sure that not more than X emails are being sent in 1 second. 我们只想确保1秒内发送的电子邮件不超过X个。
We are using rails 2.3.5. 我们正在使用Rails 2.3.5。
Thanks 谢谢
EDIT 编辑
We are using Amazon SES for sending emails. 我们正在使用Amazon SES发送电子邮件。 Initially they allow 1 email per second. 最初,他们每秒允许1封电子邮件。 What happens if we send more than one emails per seconds. 如果我们每秒发送多个电子邮件,会发生什么情况。 Would SES queue them or throw some exception? SES会将它们排队还是抛出一些异常?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.