简体   繁体   English

从Heroku上托管的Rails应用发送大量定制电子邮件

[英]Sending mass, customized emails from a Rails app hosted on Heroku

I want to be able to send a monthly email to users of my Rails app hosted on Heroku. 我希望能够向Heroku托管的我的Rails应用程序的用户发送每月电子邮件。 However, the email must be customized based on each user's preferences. 但是,必须根据每个用户的首选项自定义电子邮件。 What's the best way to do this? 最好的方法是什么?

Sendgrid does the grunt work. Sendgrid做着艰苦的工作。 Of sending the emails. 发送电子邮件。 It's a paid add on. 这是一个付费的附加项。

Since heroku only allows 30 sec of work per request, you need to use a delayed_job or similar to send out all the emails. 由于heroku每个请求只允许30秒的工作时间,因此您需要使用delay_job或类似方法发送所有电子邮件。

You only need to run the worker on heroku when your job is running. 您只需在作业运行时在heroku上运行worker。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM