allow the SMTP port to be configurable for outgoing email from the app itself

This commit is contained in:
Adam Cooke
2017-04-26 12:30:37 +01:00
parent b27e5ed1f5
commit 33f7e912c7
+1 -1
View File
@@ -1,5 +1,5 @@
require 'postal/config'
if Postal.config&.smtp
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {:address => Postal.config.smtp.host, :user_name => Postal.config.smtp.username, :password => Postal.config.smtp.password}
ActionMailer::Base.smtp_settings = {:address => Postal.config.smtp.host, :user_name => Postal.config.smtp.username, :password => Postal.config.smtp.password, :port => Postal.config.smtp.port || 25}
end