Skip to content
Permalink
Browse files

SMTP domain is also handled via config file or environment variable.

  • Loading branch information...
Laszlo Papp
Laszlo Papp committed Nov 28, 2011
1 parent 7f5f2ed commit e7c8458bbe8429524751988e162435bedbcff35e
Showing with 3 additions and 1 deletion.
  1. +1 −0 config/environment.rb
  2. +1 −1 config/initializers/mailer.rb
  3. +1 −0 config/smtp_config.rb
@@ -62,6 +62,7 @@

# Action Mailer
config.action_mailer.default_charset = "utf-8"
SMTP_DOMAIN = ENV['ECHO_SMTP_DOMAIN']
SMTP_HOST = ENV['ECHO_SMTP_HOST']
SMTP_USER = ENV['ECHO_SMTP_USER']
SMTP_PASS = ENV['ECHO_SMTP_PASS']
@@ -1,7 +1,7 @@
ActionMailer::Base.smtp_settings = {
:address => SMTP_HOST,
:port => 25,
:domain => 'echo.to',
:domain => SMTP_DOMAIN,
:authentication => :login,
:enable_starttls_auto => true,
:user_name => SMTP_USER,
@@ -1,5 +1,6 @@

# SMTP data should be set as environmental variables in development mode (ECHO_SMTP_HOST, etc.)
SMTP_DOMAIN ||= 'secret_smtp_domain'
SMTP_HOST ||= 'secret_smtp_host'
SMTP_USER ||= 'secret_smtp_user'
SMTP_PASS ||= 'secret_smtp_pass'

0 comments on commit e7c8458

Please sign in to comment.
You can’t perform that action at this time.