You are here

public function SpoolStorageInterface::getMails in Simplenews 8.2

Same name and namespace in other branches
  1. 8 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. Messages with status SpoolStorageInterface::STATUS_IN_PROGRESS will only be returned if the maximum send time has expired.

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 65

Class

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

Namespace

Drupal\simplenews\Spool

Code

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