Hi,

I've used Rules to send out emails using the loop function. I've tested it and the rules work fine, however the emails are sent out immediately even with Queue Mail enabled and configured.

I was under the impression that the mail would be routed to Queue and would only be sent out when Cron was run. I'm on localhost and I've disabled Cron so it would only run manually. I'm using the standard Drupal 7 Cron that comes bundled with Acquaia installer.

Is the configuration correct?

Please let me know if I need to provide further information.

Kind regards,

Asogan

CommentFileSizeAuthor
Queue Mail setup.jpg124.19 KBAsogan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Asogan’s picture

Issue summary: View changes
tashaharrison80’s picture

I too am wondering how to work this out. I only want to queue one email sent from Rules. I am using Mimemail so would the Mail Id be mimemail_ and then the name of the rule? So mimemail_rule_name where the rule is called rule_name.

foagth’s picture

Did you ever figure it out?
My emails from Rules are being sent immediately as well

Chewits’s picture

Hi!

I had the same issue with Rules 2.9 - there was not Rules module listed on Mail Queue configuration page.
Re-enabling Mail Queue module helped me (drush pm-disable -y queue_mail && drush pm-enable -y queue_mail).

Hope this helps you!

Alexander

EDIT:
Ha! but after that, Rules disappears from the list of modules again. Setting module Queue Mail weight greater than Rules (e.g. 25) doesn't help, too. But, "rules_*" pattern works fine for me, anyway, even when the Rules module is not presented in the list.

2pha’s picture

I can confirm this. Rules is not listed under "Modules that send emails", but adding "rules_*" to the "Mail IDs to queue" did infact work as expected.
It has something to do with module_implements('mail') (line 34 of queue_mail.admin.inc) not returning rules.

minorOffense’s picture

If that's the case then adding this should show rules in that list.

  // Rules sends mail but doesn't implement hook_mail.
  // @see rules_action_mail().
  // @see rules_action_mail_to_users_of_role().
  if (module_exists('rules')) {
    $mail_modules[] = 'rules';
  }

But this doesn't stop anyone from just adding rules_* manually to the config. It does work, you just have to know to put it in.