开发者

Rails 3.0 Mass Email

I'm building a web application were users need to ability to send out mass emails. The application is a ticket site where individuals sell tickets to various events. In turn, events have promoters that sell tickets. The sponsor of the event needs to ability to send mass emails to their p开发者_JS百科romoters. An event may have hundreds of promoters. So I'm assuming looping through each promoter and sending an email wont cut it.

Does rails 3.0 provide some kind of mass email functionality?

Thanks,

Brian


I don't think you should have a problem looping through all the promoters and sending each one an email. However, you would want to do that as a background process.

Check out delayed-job or http://www.simpleworker.com/. Both of these will let you load the email into a background job, and allow you to redirect the user in a timely manner while the emails get sent in the background.


Solomon is right, you'll definitely want to do this in a background task, which is pretty simple with something like delayed job. Have you thought about how the messages will actually be delivered though? What mail server you are going to use? Many providers won't let you send out hundreds of messages at a time, and you are likely to run into spam issues if you try to send that volume of messages from a personal email account. You may want to take a look at a service like Mailgun that specializes in this. From their FAQ:

Why not just use Sendmail + Postfix + Courier IMAP?

You can but you should be aware that there is a constant battle raging between good and evil (i.e., spam) in the email universe. In order to be on the 'good' side of that battle and get your email delivered there are numerous things you need to do. You need to have the right infrastructure and register your IP and Domain appropriately. Also, you need to have a history of email sending that complies with ESPs rules in order to build a good reputation.

Moreover, if you are going to receive, store and host emails, you better be prepared for maintaining this orchestra of software, take care of backups, hardware failures, security patches and monitoring. Stop kidding yourself, it's not 1998 anymore.

I'm not affiliated with them in any way, but in my experience getting rails to send email is trivial compared to dealing with getting it delivered successfully by the mail server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜