You are here

function mandrill_sender_plain in Mandrill 8

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

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

Mandrill_Error

File

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

Code

function mandrill_sender_plain($message) {
  $api = \Drupal::service('mandrill.api');
  return $api
    ->send($message);
}