public function MandrillAPI::addInboundDomain in Mandrill 8
Creates a new inbound domain.
Parameters
string $domain: The domain name.
Return value
array
Overrides MandrillAPIInterface::addInboundDomain
File
- src/
MandrillAPI.php, line 370
Class
- MandrillAPI
- Service class to integrate with Mandrill.
Namespace
Drupal\mandrillCode
public function addInboundDomain($domain) {
$result = NULL;
try {
if ($mandrill = $this
->getAPIObject()) {
$result = $mandrill->inbound
->addDomain($domain);
}
} catch (\Exception $e) {
\Drupal::messenger()
->addError(t('Mandrill: %message', array(
'%message' => $e
->getMessage(),
)));
$this->log
->error($e
->getMessage());
}
return $result;
}