You are here

function SpoolStorageInterface::getMails in Simplenews 8

Same name and namespace in other branches
  1. 8.2 src/Spool/SpoolStorageInterface.php \Drupal\simplenews\Spool\SpoolStorageInterface::getMails()
  2. 3.x src/Spool/SpoolStorageInterface.php \Drupal\simplenews\Spool\SpoolStorageInterface::getMails()

This function allocates mails to be sent in current run.

Drupal acquire_lock guarantees that no concurrency issue happened. If the message status is SpoolStorageInterface::STATUS_IN_PROGRESS but the maximum send time has expired, the mail id will be returned as a mail which is not allocated to another process.

Parameters

int $limit: (Optional) The maximum number of mails to load from the spool. Defaults to unlimited.

array $conditions: (Optional) Array of conditions which are applied to the query. If not set, status defaults to SpoolStorageInterface::STATUS_PENDING, SpoolStorageInterface::STATUS_IN_PROGRESS.

Return value

\Drupal\simplenews\Spool\SpoolListInterface A mail spool list.

1 method overrides SpoolStorageInterface::getMails()
SpoolStorage::getMails in src/Spool/SpoolStorage.php
This function allocates mails to be sent in current run.

File

src/Spool/SpoolStorageInterface.php, line 61

Class

SpoolStorageInterface
The spool storage manages a queue of mails that need to be sent.

Namespace

Drupal\simplenews\Spool

Code

function getMails($limit = self::UNLIMITED, $conditions = array());