i need to send an email for every row in a result set without using any services

First, before you think to recommend I’m not gonna give my mailing list any third party services because I’m not giving them my precious mailing list to use or sell or disclose I just finished reading Agile Web Development with Rails and the book had no discussion of sending emails to every row in result set I have about 200 members in my database and need to send them all an email once a month without using any third party services This shouldn’t be a big deal In perl this was nothing, but I’m not using perl anymore Can anyone point me to a good guide with examples or post example on here or gist please Thanks, fugee

First, before you think to recommend I'm not gonna give my mailing list any third party services because I'm not giving them my precious mailing list to use or sell or disclose I just finished reading Agile Web Development with Rails and the book had no discussion of sending emails to every row in result set I have about 200 members in my database and need to send them all an email once a month without using any third party services This shouldn't be a big deal In perl this was nothing, but I'm not using perl anymore Can anyone point me to a good guide with examples or post example on here or gist please Thanks, fugee

Have a look at

Also all the other guides are worth looking through.

Colin

I"m sorry That’s not right Anyone else? That guide only discusses sending a single email to multiple recipients

I"m sorry That's not right Anyone else? That guide only discusses sending a single email to multiple recipients

That is what you said you wanted to do. You said you "need to send them all an email once a month".

If you want to send a different email to each of them then just loop through the users sending the personalised email.

Colin

> I"m sorry That's not right Anyone else? > That guide only discusses sending a single email to multiple recipients

That is what you said you wanted to do. You said you "need to send them all an email once a month".

I'm guessing the missing piece of this for the OP is the "once a month" bit.

There are two basic technologies at play here:

1. Send an email to multiple recipients: ActiveMail is that bit. 2. Do something periodically, e.g., once per month: ActiveJob is that bit.

For #1, Colin's already pointed you at it. For #2, start with looking at the ActiveJob guide: Active Job Basics — Ruby on Rails Guides and investigating cron and the whenever gem, sidekiq, resque, and so on.

> I"m sorry That's not right Anyone else? > That guide only discusses sending a single email to multiple recipients

That is what you said you wanted to do. You said you "need to send them all an email once a month".

I'm guessing the missing piece of this for the OP is the "once a month" bit.

There are two basic technologies at play here:

1. Send an email to multiple recipients: ActiveMail is that bit. 2. Do something periodically, e.g., once per month: ActiveJob is that bit.

For #1, Colin's already pointed you at it. For #2, start with looking at the ActiveJob guide:Active Job Basics — Ruby on Rails Guides and investigating cron and the whenever gem, sidekiq, resque, and so on.

One last thing, even though you may not want to use an outside service because you don't want to expose your list, you can still use an outside service to get the delivery part right. I use (and recommend) SendGrid for this. There is also Mandrill, from MailChimp. Both of them let you offload the actual SMTP part of things to a hosted service that has deep experience delivering mail (and many many admins deeply good at keeping their servers off of the various blacklists out there). The "last mile" is a deeply hard problem, even when you are sending these sorts of opted-in messages to people who actively want them. Gmail and Yahoo mail make it very difficult to deliver mail to them from a Web server. This is something best left to the professionals.

Walter

I figured it out thanks The guide you recommended was helpful Thanks again