Skip to content

Instantly share code, notes, and snippets.

Created May 7, 2014 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5ca4c6fe388c465d8076 to your computer and use it in GitHub Desktop.
Save anonymous/5ca4c6fe388c465d8076 to your computer and use it in GitHub Desktop.
<?php
$apikey = 'API_KEY_HERE';
require_once 'Mandrill.php';
$mandrill = new Mandrill($apikey);
$message = new stdClass();
$message->html = "html message";
//$message->text = "text body";
$message->subject = "email subject";
$message->from_email = "from@email.com";
$message->from_name = "My App Name";
$message->to = array(array("email" => "recipient@email.com"));
$message->track_opens = true;
$response = $mandrill->messages->send($message);
var_dump($response);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment