You are here

public function MandrillAPI::send in Mandrill 8

The function that calls the API send message.

This is the default function used by mandrill_mailsend().

Parameters

array $message: Associative array containing message data.

Return value

array Results of sending the message.

Throws

\Exception

Overrides MandrillAPIInterface::send

1 method overrides MandrillAPI::send()
MandrillTestAPI::send in src/MandrillTestAPI.php
The function that calls the API send message.

File

src/MandrillAPI.php, line 490

Class

MandrillAPI
Service class to integrate with Mandrill.

Namespace

Drupal\mandrill

Code

public function send(array $message) {
  if ($mailer = $this
    ->getAPIObject()) {
    return $mailer->messages
      ->send($message);
  }
  else {
    throw new \Exception('Could not load Mandrill API.');
  }
}