Once emails have been queued, they are repeatedly sent every time cron is run. This is due to an error in the SQL that selects mail to send. Within mailq_cron()

$rs = db_query_range('SELECT * FROM {mailq_active_queue} WHERE (queue_status != %d OR queue_status != %d)
                       ORDER BY queue_priority DESC', MAILQ_STATUS_SENT, MAILQ_STATUS_FAILED, 0, variable_get('mailq_batch_size', 10));

the OR in the where clause should be changed to AND.

$rs = db_query_range('SELECT * FROM {mailq_active_queue} WHERE (queue_status != %d AND queue_status != %d)
                       ORDER BY queue_priority DESC', MAILQ_STATUS_SENT, MAILQ_STATUS_FAILED, 0, variable_get('mailq_batch_size', 10));

Comments

zyxware’s picture

Status: Active » Closed (won't fix)

ff1 - Thanks for the bug report and fix. This has been fixed in the D6 version of the module. I am marking the issue as wont-fix for D5.