You are here

public function SendinblueMailin::sendEmail in SendinBlue 7

Same name and namespace in other branches
  1. 7.2 includes/sendinblue.mailin.php \SendinblueMailin::sendEmail()

Send email via sendinblue.

Parameters

string $to: A recipe email address.

string $subject: A subject of email.

string $from: A sender email address.

string $html: A html body of email content.

string $text: A text body of email content.

array $cc: A cc address.

array $bcc: A bcc address.

string $replyto: A reply address.

array $attachment: A attachment information.

array $headers: A header of email.

Return value

array An array of response code.

File

includes/sendinblue.mailin.php, line 257
Rest class file.

Class

SendinblueMailin
Sendinblue REST client.

Code

public function sendEmail($to, $subject, $from, $html, $text, $cc = array(), $bcc = array(), $replyto = '', $attachment = array(), $headers = array()) {
  return $this
    ->post("email", drupal_json_encode(array(
    "cc" => $cc,
    "text" => $text,
    "bcc" => $bcc,
    "replyto" => $replyto,
    "html" => $html,
    "to" => $to,
    "attachment" => $attachment,
    "from" => $from,
    "subject" => $subject,
    "headers" => $headers,
  )));
}