public function MailerInterface::updateSendStatus in Simplenews 8
Same name and namespace in other branches
- 8.2 src/Mail/MailerInterface.php \Drupal\simplenews\Mail\MailerInterface::updateSendStatus()
- 3.x src/Mail/MailerInterface.php \Drupal\simplenews\Mail\MailerInterface::updateSendStatus()
Update newsletter sent status.
Set newsletter sent status based on email sent status in spool table. Translated and untranslated nodes get a different treatment.
The spool table holds data for emails to be sent and (optionally) already send emails. The simplenews_newsletter table contains the overall sent status of each newsletter issue (node). Newsletter issues get the status pending when sending is initiated. As long as unsend emails exist in the spool, the status of the newsletter remains unsend. When no pending emails are found the newsletter status is set 'send'.
Translated newsletters are a group of nodes that share the same tnid ({node}.tnid). Only one node of the group is found in the spool, but all nodes should share the same state. Therefore they are checked for the combined number of emails in the spool.
1 method overrides MailerInterface::updateSendStatus()
- Mailer::updateSendStatus in src/
Mail/ Mailer.php - Update newsletter sent status.
File
- src/
Mail/ MailerInterface.php, line 103
Class
- MailerInterface
- Sends newsletter and subscription mails.
Namespace
Drupal\simplenews\MailCode
public function updateSendStatus();