You are here

function mandrill_get_webhooks in Mandrill 7.2

Same name and namespace in other branches
  1. 8 mandrill.module \mandrill_get_webhooks()

Get a list of webhooks.

File

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

Code

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