aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/emailer.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-30 15:16:24 +0100
committerChocobozzz <me@florianbigard.com>2018-01-30 15:16:24 +0100
commitf076daa76a32074cba162459e38fa8c130ad42d0 (patch)
treeea8a92d6305afa158b7774b65e9e6098cc094b92 /server/lib/emailer.ts
parentecb4e35f4e6c7304cb274593c13cb47fd5078b75 (diff)
downloadPeerTube-f076daa76a32074cba162459e38fa8c130ad42d0.tar.gz
PeerTube-f076daa76a32074cba162459e38fa8c130ad42d0.tar.zst
PeerTube-f076daa76a32074cba162459e38fa8c130ad42d0.zip
Add tests for emails
Diffstat (limited to 'server/lib/emailer.ts')
-rw-r--r--server/lib/emailer.ts14
1 files changed, 10 insertions, 4 deletions
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts
index f5b68640e..317cec706 100644
--- a/server/lib/emailer.ts
+++ b/server/lib/emailer.ts
@@ -29,15 +29,21 @@ class Emailer {
29 } 29 }
30 } 30 }
31 31
32 let auth
33 if (CONFIG.SMTP.USERNAME && CONFIG.SMTP.PASSWORD) {
34 auth = {
35 user: CONFIG.SMTP.USERNAME,
36 pass: CONFIG.SMTP.PASSWORD
37 }
38 }
39
32 this.transporter = createTransport({ 40 this.transporter = createTransport({
33 host: CONFIG.SMTP.HOSTNAME, 41 host: CONFIG.SMTP.HOSTNAME,
34 port: CONFIG.SMTP.PORT, 42 port: CONFIG.SMTP.PORT,
35 secure: CONFIG.SMTP.TLS, 43 secure: CONFIG.SMTP.TLS,
44 ignoreTLS: isTestInstance(),
36 tls, 45 tls,
37 auth: { 46 auth
38 user: CONFIG.SMTP.USERNAME,
39 pass: CONFIG.SMTP.PASSWORD
40 }
41 }) 47 })
42 } else { 48 } else {
43 if (!isTestInstance()) { 49 if (!isTestInstance()) {