CiviMail mail job fails to complete, even though mail is sent
Overview
This relates to CiviMail mail job fails to complete, even though mail is sent that someone else has reported, but I have also seen. If a mail job fails to complete, it does not record the mails it successfully sent, so when it starts again, it sends the emails again.
Reproduction steps
It is difficult to reproduce this because we do not always see the behaviour in our environment (Joomla in a shared hosted environment), where we sometimes see this behaviour and at other times we do not because the jobs complte.
Current behaviour
Successful emails sent are only reported at the end of each batch.
Expected behaviour
The database is updated after each email is sent, so in the event of the batch failing to complete, CiviMail still knows what it has sent. Environment information
- __Browser: Not applicable
- __CiviCRM: Last seen with 5.24.x
- _PHP:7.2
- CMS: Joomla 3.9.x, but probably not relevant.
- Database: _Not relevant.
- Web Server: Not applicable
Comments
As aforesaid, we only see the issue when batches fail to complete. We worked around the issue by reducing the mailer batch size to 5.