Last active
September 1, 2015 05:41
-
-
Save Kokil/8358ea5a3db6caad424f 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 = "address@test.com"; | |
$message->from_name = "From Name"; | |
$message->to = array(array("email" => "recipient@test.com")); | |
$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