On Oct 5, 2015, at 4:59 PM, tamouse pontiki <
tamous...@gmail.com> wrote:
> On Mon, Oct 5, 2015 at 3:21 PM, Colin Law <
cla...@gmail.com> wrote:
> On 5 October 2015 at 20:58, fugee ohu <
fuge...@gmail.com> wrote:
> > 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:
http://guides.rubyonrails.org/active_job_basics.html 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.