Skip to content

Instantly share code, notes, and snippets.

@yamano yamano/sendgrid.rb

Created Apr 18, 2016
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
You can’t perform that action at this time.