Disable starttls for emails on localhost
authorChocobozzz <me@florianbigard.com>
Thu, 22 Mar 2018 14:18:56 +0000 (15:18 +0100)
committerChocobozzz <me@florianbigard.com>
Thu, 22 Mar 2018 14:18:56 +0000 (15:18 +0100)
server/lib/emailer.ts

index 9c105a57530021c7c163d10dc5aeb076d05ff6d5..1b905e5106a3162ff161cc318fc6c2f811009f55 100644 (file)
@@ -46,7 +46,7 @@ class Emailer {
         secure: CONFIG.SMTP.TLS,
         debug: CONFIG.LOG.LEVEL === 'debug',
         logger: bunyanLogger as any,
-        ignoreTLS: isTestInstance(),
+        ignoreTLS: isTestInstance() || CONFIG.SMTP.HOSTNAME === 'localhost' || CONFIG.SMTP.HOSTNAME === '127.0.0.1',
         tls,
         auth
       })