diff options
| author | Adam Soltys <[email protected]> | 2021-08-03 04:44:14 -0400 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-08-03 04:44:14 -0400 |
| commit | 889e472f78660f4680586ae0606650229e87d75d (patch) | |
| tree | f50ba25bc53e7747ada9e3978fb7212b8e2c33a8 /lib | |
| parent | 29956a035056c76b3329792feb9a7fb3d7c8ec0e (diff) | |
| download | coinos-server-889e472f78660f4680586ae0606650229e87d75d.tar.gz coinos-server-889e472f78660f4680586ae0606650229e87d75d.zip | |
silhouettes contact endpoint
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/mail.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/mail.js b/lib/mail.js index 9780fab7..ca2c2b81 100644 --- a/lib/mail.js +++ b/lib/mail.js @@ -11,6 +11,22 @@ function openInbox(cb) { } app.post( + "/contact-sil", + ah((req, res) => { + const mailgun = require("mailgun-js")(config.mailgun); + let data = { + subject: "Contact form", + text: JSON.stringify(req.body), + from: "[email protected]", + to: "[email protected]" + }; + + mailgun.messages().send(data); + res.send(req.body); + }) +); + +app.post( "/contact", ah((req, res) => { const mailgun = require("mailgun-js")(config.mailgun); |
