I noticed that I had an empty email accidentally stored in my subscription table which leaked to the spool table, and that message was never being removed from the spool (probably it would after expiring).

I removed it manually and noticed the newsletter status was not properly set to sent although the spool was empty. I checked the code, and the status was only being updated when there were actual messages to sent, but the clear spool function can also clear rows from that table, so I think it's better to have the update status be run on the _cron() hook after the other two.

Attached is a patch for that.

CommentFileSizeAuthor
simplenews_updatastatusoncron.patch796 byteshanoii

Comments

sutharsan’s picture

Status: Needs review » Fixed

Patch committed, thanks for the improvement. Fixes will be available in the next 1.x and 2.x dev releases.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.