Created
July 29, 2013 12:36
-
-
Save vparihar01/6104015 to your computer and use it in GitHub Desktop.
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 'mail' | |
Mail.defaults do | |
delivery_method :smtp, { :address => "smtp.sendgrid.net", | |
:port => 587, | |
:domain => "xyz.com", | |
:user_name => "xyz@zyz.com", | |
:password => "xyz", | |
:authentication => 'plain', | |
:enable_starttls_auto => true } | |
end | |
mail = Mail.deliver do | |
to 'vivek@weboniselab.com' | |
from 'vivek@weboniselab.com' | |
subject 'This is the subject of your email' | |
text_part do | |
body 'Hello world in text' | |
end | |
html_part do | |
content_type 'text/html; charset=UTF-8' | |
body '<b>Hello world in HTML</b>' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment