Created
February 22, 2013 20:22
-
-
Save brandonmwest/5016294 to your computer and use it in GitHub Desktop.
Send email from SendGrid using Pony gem
This file contains 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 'rubygems' | |
require 'pony' | |
#set the default options | |
Pony.options = { | |
:from => 'demo@sendgrid.com', | |
:via => :smtp, | |
:via_options => { | |
:address => 'smtp.sendgrid.net', | |
:port => '587', | |
:user_name => 'sendgriduser', | |
:password => 'sendgridpassword', | |
:authentication => :plain | |
} | |
} | |
message = Pony.mail :to => 'brandon.west@sendgrid.com', :from => 'brawest@gmail.com', :subject => 'SendGrid Delivered!', :body => 'Hello there. You look great today!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment