aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/miscs/email-child-process.js
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/miscs/email-child-process.js')
-rw-r--r--shared/extra-utils/miscs/email-child-process.js27
1 files changed, 0 insertions, 27 deletions
diff --git a/shared/extra-utils/miscs/email-child-process.js b/shared/extra-utils/miscs/email-child-process.js
deleted file mode 100644
index 088a5a08c..000000000
--- a/shared/extra-utils/miscs/email-child-process.js
+++ /dev/null
@@ -1,27 +0,0 @@
1const MailDev = require('maildev')
2
3// must run maildev as forked ChildProcess
4// failed instantiation stops main process with exit code 0
5process.on('message', (msg) => {
6 if (msg.start) {
7 const maildev = new MailDev({
8 ip: '127.0.0.1',
9 smtp: msg.port,
10 disableWeb: true,
11 silent: true
12 })
13
14 maildev.on('new', email => {
15 process.send({ email })
16 })
17
18 maildev.listen(err => {
19 if (err) {
20 // cannot send as Error object
21 return process.send({ err: err.message })
22 }
23
24 return process.send({ err: null })
25 })
26 }
27})