You are here

function hook_mandrill_mailsend_result in Mandrill 7.2

Same name and namespace in other branches
  1. 8 mandrill.api.php \hook_mandrill_mailsend_result()
  2. 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 $params: Associative array containing the message information sent to Mandrill.

1 function implements hook_mandrill_mailsend_result()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

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

File

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

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