public function PetInterface::sendMail in Previewable email templates 8.3
Send PET to one or more recipients.
Parameters
array $recipients: Recipient email addresses.
array $context: Context items to be used for token substitutions. E.g.: [ 'uid' => NULL, 'nid' => 4, ] 'uid' will always be set when preparing data, either the user id matching recipient address, or '0' in case of no match. Modules providing tokens for PET should implement hook_pet_substitutions_alter(&$substitutions).
Return value
array Result value of MailManager::mail() for each mail keyed by recipient email address.
1 method overrides PetInterface::sendMail()
- Pet::sendMail in src/
Entity/ Pet.php - Send PET to one or more recipients.
File
- src/
Entity/ PetInterface.php, line 195
Class
- PetInterface
- Provides an interface for defining Pet entities.
Namespace
Drupal\pet\EntityCode
public function sendMail(array $recipients, array $context);