You are here

function mandrill_delete_webhook in Mandrill 7.2

Delete an existing webhook.

File

./mandrill.module, line 567
Enables Drupal to send email directly through Mandrill.

Code

function mandrill_delete_webhook($webhook_id) {
  $result = NULL;
  try {
    if ($mandrill = mandrill_get_api_object()) {
      $result = $mandrill->webhooks
        ->delete($webhook_id);
    }
  } catch (Mandrill_Error $e) {
    drupal_set_message(t('Mandrill: %message', array(
      '%message' => $e
        ->getMessage(),
    )), 'error');
    watchdog_exception('mandrill', $e);
  }
  return $result;
}