aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mail.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-01-16 23:40:25 -0800
committerAdam Soltys <[email protected]>2023-01-16 23:40:25 -0800
commit91e847126c832efa25ab0bf8d6f3b7e537378fa7 (patch)
tree4a42b6e3bec6eb0f640ed44533b54e6d3d6a5e0e /lib/mail.js
parent6bafea9bffe24d2227d269812a73a9a513d92ddf (diff)
downloadcoinos-server-91e847126c832efa25ab0bf8d6f3b7e537378fa7.tar.gz
coinos-server-91e847126c832efa25ab0bf8d6f3b7e537378fa7.zip
shuffle things around
Diffstat (limited to 'lib/mail.js')
-rw-r--r--lib/mail.js29
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/mail.js b/lib/mail.js
deleted file mode 100644
index 966ce578..00000000
--- a/lib/mail.js
+++ /dev/null
@@ -1,29 +0,0 @@
-import app from "$app";
-import config from "$config";
-
-app.post("/email", async (req, res) => {
- try {
- try {
- var postmark = await import("postmark");
-
- var client = new postmark.ServerClient(config.postmark);
-
- await client.sendEmail({
- Subject: req.body.subject || "Email Signup",
- HtmlBody: JSON.stringify(req.body),
- TextBody: JSON.stringify(req.body),
- MessageStream: "outbound"
- });
-
- res.send({ ok: true });
- } catch (e) {
- console.log("problem sending email", e);
- res.code(500).send(e.message);
- }
- } catch (e) {
- console.log(e);
- res.code(500).send(e.message);
- }
-});