You are here

function mandrill_get_inbound_routes in Mandrill 7.2

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

Get a list of inbound email routes for a domain.

File

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

Code

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