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)
|
smtp.enable_starttls_auto if smtp.respond_to?(:enable_starttls_auto)
|
||||||
end
|
end
|
||||||
|
|
||||||
smtp.start(ENV['SMTP_DOMAIN'], ENV['SMTP_USERNAME'], ENV['SMTP_PASSWORD'],
|
user = ENV['SMTP_USERNAME'].presence || nil
|
||||||
ENV['SMTP_AUTH']) do |s|
|
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')
|
s.sendmail('test', ENV['SMTP_USERNAME'], 'notifications@example.com')
|
||||||
end
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
|
|
Loading…
Reference in New Issue