Create, send & track email with Mandrill
Send a text email

Now that your account is set up and ready to go, you can send a quick text email. The example code includes a new variable, params, which is where we'll have all of the message information such as the sender address, recipient information, subject line, and the content of your email.

Go check out the documentation for the messages/send.json API call to see all of the parameters you can use for a message.


The example includes just the required parameters. Add your API key on line 7, your sender email address for the from_email parameter on line 12, and a recipient address in the to parameter on line 13.

For the official Mandrill API wrappers, API calls follow the documented methods. So, for example, to ping the account, you can call the users.ping method. Likewise, to send a message, you'd use messages.send. Change line 22 to call the messages.send method on the variable m which is an instance of the Mandrill class to be able to send the message.

View Preview