Fix for email verification issue (GRN-36) (#300)

* <incorrect smtp settings no longer crashes the application>

* <Added rspec tests>

* <>

* Delete env

* Update development.rb
This commit is contained in:
John Ma
2018-10-17 11:42:50 -04:00
committed by Jesus Federico
parent de5bbc44f2
commit 1bb5be68a5
6 changed files with 64 additions and 7 deletions

View File

@ -41,8 +41,8 @@ Rails.application.configure do
enable_starttls_auto: ENV['SMTP_STARTTLS_AUTO'],
}
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
# Do care if the mailer can't send.
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_caching = false

View File

@ -54,6 +54,22 @@ Rails.application.configure do
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
# Tell Action Mailer to use smtp server
config.action_mailer.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
address: ENV['SMTP_SERVER'],
port: ENV["SMTP_PORT"],
domain: ENV['SMTP_DOMAIN'],
user_name: ENV['SMTP_USERNAME'],
password: ENV['SMTP_PASSWORD'],
authentication: ENV['SMTP_AUTH'],
enable_starttls_auto: ENV['SMTP_STARTTLS_AUTO'],
}
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = true
# Use a real queuing backend for Active Job (and separate queues per environment)
# config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "greenlight-2_0_#{Rails.env}"

View File

@ -25,6 +25,7 @@ en:
cancel: Cancel
copy: Copy
delete: Delete
delivery_error: An error occured during email delivery. Please contact an administrator!
docs: Documentation
email: Email
enter_your_name: Enter your name!