Skip to content

Instantly share code, notes, and snippets.

@thehungrycoder
Last active December 23, 2015 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thehungrycoder/2fb3b4923bae1709eb81 to your computer and use it in GitHub Desktop.
Save thehungrycoder/2fb3b4923bae1709eb81 to your computer and use it in GitHub Desktop.
Example of using sparkpost's ruby gem Raw
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
source 'https://rubygems.org'
gem 'sparkpost'
@thehungrycoder
Copy link
Author

Don't forget bundle or bundle install :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment