Last active
August 29, 2015 14:25
-
-
Save zarankumar/063eca3292f0f764d039 to your computer and use it in GitHub Desktop.
Simple send an email via Mandrill API. I could not find this anywhere else so hopefully it is helpful to somebody else. At this point you should be able to look at the api docs and figure out the different options.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Send Email | |
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 = "[email protected]"; | |
$message->from_name = "From Name"; | |
$message->to = array(array("email" => "[email protected]")); | |
$message->track_opens = true; | |
$response = $mandrill->messages->send($message); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment