Warn rather than failing if there is no smtp sender address
This commit is contained in:
parent
c3a38eaab4
commit
7d125e68e9
1 changed files with 9 additions and 1 deletions
|
|
@ -6,7 +6,15 @@
|
|||
# four configuration values can also be set straight in your models.
|
||||
Devise.setup do |config|
|
||||
# Configure the e-mail address which will be shown in DeviseMailer.
|
||||
config.mailer_sender = APP_CONFIG[:smtp_sender_address]
|
||||
if APP_CONFIG[:smtp_sender_address]
|
||||
config.mailer_sender = APP_CONFIG[:smtp_sender_address]
|
||||
else
|
||||
unless Rails.env == 'test'
|
||||
Rails.logger.warn("No smtp sender address set, mail may fail.")
|
||||
puts "WARNING: No smtp sender address set, mail may fail."
|
||||
end
|
||||
config.mailer_sender = "please-change-me@config-initializers-devise.com"
|
||||
end
|
||||
|
||||
# ==> ORM configuration
|
||||
# Load and configure the ORM. Supports :active_record (default), :mongoid
|
||||
|
|
|
|||
Loading…
Reference in a new issue