Skip to content

Instantly share code, notes, and snippets.

@yamano
Created April 18, 2016 13:33
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 yamano/a3e6a174a0c72f8524483cf151d65109 to your computer and use it in GitHub Desktop.
Save yamano/a3e6a174a0c72f8524483cf151d65109 to your computer and use it in GitHub Desktop.
require 'sendgrid-ruby'
client = SendGrid::Client.new(api_key: 'XXXXXXXXXXXXXXXXXXXXX')
res = client.send(SendGrid::Mail.new(to: 'XXXXXXXX@XXXX.XXX', from: 'test@example.com', subject: 'Hello world!', text: 'Hi there!', html: '<b>Hi there!</b>'))
puts res.code
puts res.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment