Last active
December 23, 2015 21:53
-
-
Save thehungrycoder/2fb3b4923bae1709eb81 to your computer and use it in GitHub Desktop.
Example of using sparkpost's ruby gem Raw
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 'sparkpost' | |
sp = SparkPost::Client.new() # api key in env variable | |
response = sp.transmission.send_message('TO_EMAIL', 'FROM_EMAIL', 'test email', '<h1>HTML message</h1>') | |
puts response |
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
source 'https://rubygems.org' | |
gem 'sparkpost' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't forget
bundle
orbundle install
:)