aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/utils/miscs
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-01-09 15:14:29 +0100
committerChocobozzz <me@florianbigard.com>2019-01-10 11:32:37 +0100
commita4101923e699e49ceb9ff36e971c75417fafc9f0 (patch)
treec098a87ac5a85e1bc7454facbb59ecbd6c7dac82 /shared/utils/miscs
parent8d00889b6038c38d9c86cbeca88a9f3c23962c48 (diff)
downloadPeerTube-a4101923e699e49ceb9ff36e971c75417fafc9f0.tar.gz
PeerTube-a4101923e699e49ceb9ff36e971c75417fafc9f0.tar.zst
PeerTube-a4101923e699e49ceb9ff36e971c75417fafc9f0.zip
Implement contact form on server side
Diffstat (limited to 'shared/utils/miscs')
-rw-r--r--shared/utils/miscs/email.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/shared/utils/miscs/email.ts b/shared/utils/miscs/email.ts
index 6fac7621f..f9f1bd95b 100644
--- a/shared/utils/miscs/email.ts
+++ b/shared/utils/miscs/email.ts
@@ -15,6 +15,8 @@ class MockSmtpServer {
15 return this.emails.push(msg.email) 15 return this.emails.push(msg.email)
16 } 16 }
17 }) 17 })
18
19 process.on('exit', () => this.kill())
18 } 20 }
19 21
20 collectEmails (emailsCollection: object[]) { 22 collectEmails (emailsCollection: object[]) {
@@ -42,6 +44,8 @@ class MockSmtpServer {
42 } 44 }
43 45
44 kill () { 46 kill () {
47 if (!this.emailChildProcess) return
48
45 process.kill(this.emailChildProcess.pid) 49 process.kill(this.emailChildProcess.pid)
46 50
47 this.emailChildProcess = null 51 this.emailChildProcess = null