When sending a message via `message_subscribe_send_message()` with `use queue` set to TRUE in the subscribe_options, the same message will send on every cron run.

This happens with both rc2 and dev versions.

I have to manually remove the records from the queue table for them to stop sending.

Is there an issue here or is it the way I'm sending the message?

// First I setup the subscripte options to use the queue
$notify_options = array();
$subscribe_options = array('uids' => array(), 'use queue' => TRUE);
$subscribe_options['uids'][1] = array('notifiers' => array('email'));
// Then create the $message here
...
// Finally, send the message
message_subscribe_send_message('node', $node, $message, $notify_options, $subscribe_options);

Comments

mmilano created an issue. See original summary.

mmilano’s picture

If I comment out the very last `if` condition of `message_subscribe_send_message()`, it works as expected by sending the email only once on the next cron run.

This last condition seems to be re-queueing the message after it is sent. (line 161, if ($use_queue) {)

StevenJay’s picture

I am seeing the same functionality. Any update on a solution?

bluegeek9’s picture

Status: Active » Closed (outdated)