function hook_mandrill_mailsend_result in Mandrill 8
Same name and namespace in other branches
- 7.2 mandrill.api.php \hook_mandrill_mailsend_result()
- 7 mandrill.api.php \hook_mandrill_mailsend_result()
Allow other modules to respond to the result of sending an email.
Parameters
array $result: Associative array containing the send result, including the status.
array $message: Associative array containing the message information sent to Mandrill.
2 invocations of hook_mandrill_mailsend_result()
- MandrillService::handleSendResponse in src/
MandrillService.php - Response handler for sent messages.
- MandrillTestService::handleSendResponse in src/
MandrillTestService.php - Response handler for sent messages.
File
- ./
mandrill.api.php, line 31 - This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.
Code
function hook_mandrill_mailsend_result($result, $message) {
if ($result['status'] == 'rejected') {
// Delete user.
$user = user_load_by_mail($result['email']);
$user->uid
->delete();
}
}