Allow smtp port to be customizable via SMTP_PORT
This commit is contained in:
parent
066bf32e0c
commit
5c35572d29
@ -45,12 +45,12 @@ Rails.application.configure do
|
||||
|
||||
config.action_mailer.smtp_settings = {
|
||||
address: ENV['SMTP_ADDRESS'],
|
||||
port: 587,
|
||||
port: ENV.fetch('SMTP_PORT', "587").to_i,
|
||||
domain: ENV['SMTP_DOMAIN'],
|
||||
user_name: ENV['SMTP_USERNAME'],
|
||||
password: ENV['SMTP_PASSWORD'],
|
||||
authentication: 'plain',
|
||||
enable_starttls_auto: true,
|
||||
enable_starttls_auto: ENV.fetch("SMTP_STARTTLS", "true") == "true",
|
||||
}
|
||||
|
||||
config.action_mailer.default_url_options = {
|
||||
|
@ -59,12 +59,12 @@ Rails.application.configure do
|
||||
|
||||
config.action_mailer.smtp_settings = {
|
||||
address: ENV['SMTP_ADDRESS'],
|
||||
port: 587,
|
||||
port: ENV.fetch('SMTP_PORT', "587").to_i,
|
||||
domain: ENV['SMTP_DOMAIN'],
|
||||
user_name: ENV['SMTP_USERNAME'],
|
||||
password: ENV['SMTP_PASSWORD'],
|
||||
authentication: 'plain',
|
||||
enable_starttls_auto: true,
|
||||
enable_starttls_auto: ENV.fetch("SMTP_STARTTLS", "true") == "true",
|
||||
}
|
||||
|
||||
config.action_mailer.default_url_options = {
|
||||
|
@ -1,5 +1,7 @@
|
||||
DATABASE_URL=postgres://username:password@example.org/dbname
|
||||
SMTP_ADDRESS=smtp.example.org
|
||||
SMTP_PORT=587
|
||||
SMTP_STARTTLS=true
|
||||
SMTP_DOMAIN=example.org
|
||||
SMTP_USERNAME=username
|
||||
SMTP_PASSWORD=password
|
||||
|
Loading…
Reference in New Issue
Block a user