You are here

function mandrill_get_subaccounts in Mandrill 7

Same name and namespace in other branches
  1. 8 mandrill.module \mandrill_get_subaccounts()
  2. 7.2 mandrill.module \mandrill_get_subaccounts()

Get a list of subaccounts.

1 call to mandrill_get_subaccounts()
mandrill_admin_settings in ./mandrill.admin.inc
Administrative settings.

File

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

Code

function mandrill_get_subaccounts() {
  $subaccounts = array();
  try {
    $mandrill = mandrill_get_api_object();
    $subaccounts = $mandrill
      ->subaccounts();
  } catch (MandrillException $e) {
    drupal_set_message(t('Mandrill: %message', array(
      '%message' => check_plain($e
        ->getMessage()),
    )), 'error');
    watchdog_exception('mandrill', $e);
  }
  return $subaccounts;
}