You are here

public function MailerInterface::sendSpool in Simplenews 8

Same name and namespace in other branches
  1. 8.2 src/Mail/MailerInterface.php \Drupal\simplenews\Mail\MailerInterface::sendSpool()
  2. 3.x src/Mail/MailerInterface.php \Drupal\simplenews\Mail\MailerInterface::sendSpool()

Send simplenews newsletters from the spool.

Individual newsletter emails are stored in database spool. Sending is triggered by cron or immediately when the node is saved. Mail data is retrieved from the spool, rendered and send one by one If sending is successful the message is marked as send in the spool.

@todo: Redesign API to allow language counter in multilingual sends.

Parameters

int $limit: (Optional) The maximum number of mails to send. Defaults to unlimited.

array $conditions: (Optional) Array of spool conditions which are applied to the query.

Return value

int Returns the amount of sent mails.

1 method overrides MailerInterface::sendSpool()
Mailer::sendSpool in src/Mail/Mailer.php
Send simplenews newsletters from the spool.

File

src/Mail/MailerInterface.php, line 47

Class

MailerInterface
Sends newsletter and subscription mails.

Namespace

Drupal\simplenews\Mail

Code

public function sendSpool($limit = SpoolStorageInterface::UNLIMITED, array $conditions = array());