Created
February 27, 2011 08:54
-
-
Save watson/846027 to your computer and use it in GitHub Desktop.
Setup SendGrid SMTP
This file contains hidden or 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
class Mailer < ActionMailer::Base | |
def test | |
recipients "[email protected]" | |
from "[email protected]" | |
subject "Testing SendGrid" | |
end | |
end |
This file contains hidden or 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
config.action_mailer.raise_delivery_errors = true | |
config.action_mailer.delivery_method = :smtp | |
config.action_mailer.smtp_settings = { | |
:address => 'smtp.sendgrid.com', | |
:port => 25, | |
:domain => 'www.example.com', | |
:authentication => :login, | |
:user_name => 'email', | |
:password => 'secret' | |
} |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment