aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mail.js
diff options
context:
space:
mode:
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);
- }
-});