Created
April 5, 2015 19:23
-
-
Save kernelsmith/b241342171af7bd1a9da to your computer and use it in GitHub Desktop.
Mailgun
This file contains hidden or 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
| require 'mailgun' | |
| # First, instantiate the Mailgun Client with your API key | |
| mailgun = Mailgun::Client.new "your-api-key" | |
| # Define your message parameters | |
| message_params = {:from => 'me@sending_domain.com', | |
| :to => 'you@example.com', | |
| :subject => 'The Ruby SDK is awesome!', | |
| :text => 'It is really easy to send a message!'} | |
| # Send your message through the client | |
| mailgun.send_message "sending_domain.com", message_params | |
| # you can use a batch message and template to send form emails |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment