Created
December 5, 2012 18:05
-
-
Save caherrerapa/4218002 to your computer and use it in GitHub Desktop.
mailer_rails
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
SampleApp::Application.configure do | |
... | |
require 'tlsmail' | |
Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE) | |
ActionMailer::Base.delivery_method = :smtp | |
ActionMailer::Base.perform_deliveries = true | |
ActionMailer::Base.raise_delivery_errors = true | |
ActionMailer::Base.smtp_settings = { | |
:enable_starttls_auto => true, | |
:address => 'smtp.gmail.com', | |
:port => 587, | |
:tls => true, | |
:domain => 'YOUR_DOMAIN_NAME.com', | |
:authentication => :plain, | |
:user_name => 'YOUR_USERNAME@YOUR_DOMAIN.com', | |
:password => 'YOUR_PASSWORD' # for security reasons you can use a environment variable too. (ENV['INFO_MAIL_PASS']) | |
} | |
... | |
config.action_mailer.default_url_options = { :host => 'YOUR_DOMAIN_NAME.com' } | |
... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment