You are here

public function MandrillAPI::deleteInboundDomain in Mandrill 8

Deletes an inbound domain.

Parameters

string $domain: The domain name.

Return value

array

Overrides MandrillAPIInterface::deleteInboundDomain

File

src/MandrillAPI.php, line 414

Class

MandrillAPI
Service class to integrate with Mandrill.

Namespace

Drupal\mandrill

Code

public function deleteInboundDomain($domain) {
  $result = NULL;
  try {
    if ($mandrill = $this
      ->getAPIObject()) {
      $result = $mandrill->inbound
        ->deleteDomain($domain);
    }
  } catch (\Exception $e) {
    \Drupal::messenger()
      ->addError(t('Mandrill: %message', array(
      '%message' => $e
        ->getMessage(),
    )));
    $this->log
      ->error($e
      ->getMessage());
  }
  return $result;
}