Skip to content

Instantly share code, notes, and snippets.

@yamano
Created April 18, 2016 13:33
Embed
What would you like to do?
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