Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
Hi I have a list of emails (say 500) stored as pages. If I wanted to bulk email this group could I just loop through these pages with <cms:pages> and send with <cms:send_mail> ? Is there any disadvantage to this method?
Depending on your server's configuration, you could risk overwhelming the resources by trying to push through all the mails in a singe go.

Preferred way would be to take the 'staggered' approach as done by the CSV importer -
viewtopic.php?f=5&t=8803#p17456

I think you can modify it to send emails in batches of, say, 20 per loop.

Hope this helps.
So how would you do this? Use a variable like my count to increment up to 20, then if it is 20 an if block sets it back to zero and sleeps like a minute? And then keeps going until the queue is finished? Sorry I'm not very familiar with bulk email sending and I'm trying to send an email with custom fields each time. I also intend to send one email per day (it's all opt-in, so it's not spam) so I don't think having several templates like with mailchimp would be practical.
Normally you would setup a cron job und send about 50 mails from the queue. I would propose to use sendmail.
https://simonwpt.github.io/CouchDocs/ta ... _mail.html
4 posts Page 1 of 1