forked from External/greenlight
Fixed configuration rake task check (#1155)
Co-authored-by: Jesus Federico <jesus@123it.ca>
This commit is contained in:
parent
509215ae8d
commit
11cdd1ec14
|
@ -44,8 +44,11 @@ def test_smtp
|
|||
smtp.enable_starttls_auto if smtp.respond_to?(:enable_starttls_auto)
|
||||
end
|
||||
|
||||
smtp.start(ENV['SMTP_DOMAIN'], ENV['SMTP_USERNAME'], ENV['SMTP_PASSWORD'],
|
||||
ENV['SMTP_AUTH']) do |s|
|
||||
user = ENV['SMTP_USERNAME'].presence || nil
|
||||
password = ENV['SMTP_PASSWORD'].presence || nil
|
||||
authtype = ENV['SMTP_AUTH'].present? && ENV['SMTP_AUTH'] != "none" ? ENV['SMTP_AUTH'] : nil
|
||||
|
||||
smtp.start(ENV['SMTP_DOMAIN'], user, password, authtype) do |s|
|
||||
s.sendmail('test', ENV['SMTP_USERNAME'], 'notifications@example.com')
|
||||
end
|
||||
rescue => e
|
||||
|
|
Loading…
Reference in New Issue