2

I have a scheduled rule (schedule, rules module) to send a HTML email (mime module), using a View to list the email addresses (View Rules).

I tested this based on a couple of users (all users within my site's database) and everything worked as expected. When I increased the number of emails (to around 1400), I found that around half the users received the email, over and over again.

I also noticed that when I manually run CRON, the page times out.

I can't see any errors logged, but these may have been cleared.

Could anyone explain why this is occurring? I'm confident that everything was working before the increase in user numbers.

If a CRON task times out / errors, does it repeat on every page hit until it is successful ?

  • "Views send":drupal.org/project/views_send also out there to try out. You can use VBO module too. – heshanlk Jul 5 '13 at 14:22
  • Sending emails with Rules is slow, so you need to separate it and send during cron or do drupal bulk operation or drush. Timeout will be inevitable if you send that amount with rules. – ram4nd Jul 7 '13 at 20:03
0
+100

Use the Mail Chimp module to integrate with MailChimp. This is a popular email external delivery service.

The module makes it easy for website users or visitors to control which of your email lists they want to be on (or off), lets you generate and send MailChimp email campaigns from your site, and lets you and your users view a history of emails they have been sent from MailChimp. More generally, it aspires to makes your email delivery world efficient and to make your user's email receipt and control simple and precise. Thanks to MailChimp's ongoing sponsorship, this module is actively maintained and regularly adding features.

A tested, working solution can be found on on http://azadnegar.com.

2

The Mandrill module (combined with the Mandrill service) lets you send transactional emails (and, theoretically, bulk emails) very quickly. It has a built-in queue feature which adds outgoing emails to a cron queue.

Note that the Mandrill service requires you to build up a reasonable sender reputation before you can send many emails at the same time - there are hourly limits that increase automatically. And of course it can cost money.

The Queue Mail module is a general-purpose solution to queue outgoing emails, if you don't want to run Mandrill or other modules that have their own queueing.

Regarding cron: Drupal's built-in cron triggers all repeating tasks to run at once, which means it can be very slow for complex sites. Many cron tasks don't need to run that often, and many of them shouldn't run often (for example, the system cron clears caches, which can really slow down the site).

So you can use the Elysia Cron module to manage cron jobs more effectively: it allows you to separate tasks so that the ones that are fast and need to be frequent (such as Mandrill cron) run say every minute, while the ones that are slow (such as system cron) run every week.

The Ultimate Cron module is an alternative to Elysia Cron - I haven't used it recently so I'm not certain that it works well.

0

Sending e-mails is slow. Always was, always will be. What more, anti-spam techniques deliberately makes it even slower. It is specifically designed that way to discourage mass mail sending in one huge package, because even if mails like that happen to be legitimate, they are huge strain for receiving servers and could potentially work like DoS attack.

Timeout will only log to server's error log. By the very nature it cannot log to Drupal's one, because when it happens Drupal's script is dead and cannot do a thing. That's why you will not see a thing logged in watchdog reports.

One solution is to simply hire others to take the problem. MailChimp is easily integrated with Drupal, and at least for now, free for up to 2000 recipients. I'm sure there are many competitors, too.

Other way is to set up sending server locally. Then be sure it has mass sending prevention methods turned off and accepts connections from localhost only. Use SMTP Authentication Support to push all mails into it. Then script should work much faster, hopefully without timeouts.

Using Batch API to send mails might work, but would require a lot of custom coding and mails could not be triggered by regular users - you don't want regular user to see "your action triggered mass mailing, sending to 451 users", and hope he will wait patiently without closing browser.

0

If your emails are transactional/triggered in nature,then Pepipost can be a best fit.

To send emails from Drupal using Pepipost, you may use the SMTP Authentication Support module or the Swift Mailer module depending on your needs.

Ref : http://support.pepipost.com/knowledge_base/topics/drupal

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy