Getting mailer working
This commit is contained in:
@@ -1,11 +1,32 @@
|
||||
development:
|
||||
door_access_url: "http://192.168.1.177"
|
||||
door_access_password: "1234"
|
||||
smtp_tls: true
|
||||
smtp_address: "smtp.gmail.com"
|
||||
smtp_port: 587
|
||||
smtp_domain: "gmail.com"
|
||||
smtp_authentication: "login"
|
||||
smtp_user: ""
|
||||
smtp_password: ""
|
||||
|
||||
test:
|
||||
door_access_url: "http://192.168.1.177"
|
||||
door_access_password: "1234"
|
||||
smtp_tls: true
|
||||
smtp_address: "smtp.gmail.com"
|
||||
smtp_port: 587
|
||||
smtp_domain: "gmail.com"
|
||||
smtp_authentication: "login"
|
||||
smtp_user: ""
|
||||
smtp_password: ""
|
||||
|
||||
production:
|
||||
door_access_url: "http://192.168.1.177"
|
||||
door_access_password: "1234"
|
||||
smtp_tls: true
|
||||
smtp_address: "smtp.gmail.com"
|
||||
smtp_port: 587
|
||||
smtp_domain: "gmail.com"
|
||||
smtp_authentication: "login"
|
||||
smtp_user: ""
|
||||
smtp_password: ""
|
||||
|
||||
@@ -1 +1,13 @@
|
||||
APP_CONFIG = YAML.load_file("#{Rails.root}/config/config.yml")[Rails.env]
|
||||
|
||||
ActionMailer::Base.delivery_method = :smtp
|
||||
ActionMailer::Base.smtp_settings = {
|
||||
:tls => APP_CONFIG['smtp_tls'],
|
||||
:address => APP_CONFIG['smtp_address'],
|
||||
:port => APP_CONFIG['smtp_port'],
|
||||
:domain => APP_CONFIG['smtp_domain'],
|
||||
:authentication => APP_CONFIG['smtp_authentication'],
|
||||
:user_name => APP_CONFIG['smtp_user'],
|
||||
:password => APP_CONFIG['smtp_password']
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user