You are here

function hook_mandrill_mailsend_result in Mandrill 7

Same name and namespace in other branches
  1. 8 mandrill.api.php \hook_mandrill_mailsend_result()
  2. 7.2 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.

1 invocation of hook_mandrill_mailsend_result()
mandrill_mailsend in ./mandrill.module
Abstracts sending of messages, allowing queueing option.

File

./mandrill.api.php, line 44
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) {
  if ($result['status'] == 'rejected') {

    // Delete user.
    $user = user_load_by_mail($result['email']);
    user_delete($user->uid);
  }
}