function mandrill_get_subaccounts in Mandrill 7.2
Same name and namespace in other branches
- 8 mandrill.module \mandrill_get_subaccounts()
- 7 mandrill.module \mandrill_get_subaccounts()
Get a list of subaccounts.
2 calls to mandrill_get_subaccounts()
- MandrillTestCase::testGetSubaccounts in tests/
mandrill.test - Tests getting a list of subaccounts.
- mandrill_admin_settings in ./
mandrill.admin.inc - Administrative settings.
File
- ./
mandrill.module, line 438 - Enables Drupal to send email directly through Mandrill.
Code
function mandrill_get_subaccounts() {
$subaccounts = array();
try {
if ($mandrill = mandrill_get_api_object()) {
$subaccounts = $mandrill->subaccounts
->getList();
}
} catch (Mandrill_Error $e) {
drupal_set_message(t('Mandrill: %message', array(
'%message' => $e
->getMessage(),
)), 'error');
watchdog_exception('mandrill', $e);
}
return $subaccounts;
}