Skip to content

Instantly share code, notes, and snippets.

@fukajun
Created September 5, 2013 03:54
Show Gist options
  • Select an option

  • Save fukajun/6445896 to your computer and use it in GitHub Desktop.

Select an option

Save fukajun/6445896 to your computer and use it in GitHub Desktop.
require 'mandrill'
m = Mandrill::API.new
message = {
:subject=> "Hello from the Mandrill API",
:from_name=> "Your name",
:text=>"Hi message, how are you?",
:to=>[
{
:email=> "fukajun.shark@gmail.com",
:name=> "fukajun Test user"
}
],
:html=>"<html><h1>Hi <strong>message</strong>, how are you?</h1><a href='http://fukajun.org/'>click me</a> </html>",
:from_email=>"sender@yourdomain.com"
}
sending = m.messages.send message
puts sending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment