public function MandrillTestAPI::getMessages in Mandrill 8
Gets messages received by an email address.
Parameters
$email: The email address of the message recipient.
Return value
array
Overrides MandrillAPI::getMessages
File
- src/
MandrillTestAPI.php, line 13
Class
- MandrillTestAPI
- Overrides functions in the Mandrill API service for testing.
Namespace
Drupal\mandrillCode
public function getMessages($email) {
$matched_messages = array();
$query_key = 'email';
$query_value = $email;
$messages = $this
->getTestMessagesData();
foreach ($messages as $message) {
if (isset($message[$query_key]) && $message[$query_key] == $query_value) {
$matched_messages[] = $message;
}
}
return $matched_messages;
}