summaryrefslogtreecommitdiff
path: root/website/src/actions/otp/send-otp.ts
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-01-08 21:13:38 +0000
committerJoe Carstairs <me@joeac.net>2026-01-08 21:13:38 +0000
commit48ca4c2a03df35b8d5d7555ac1f288f3daabc890 (patch)
tree90100b81e7f29136420b68d7850924cc0c5ea946 /website/src/actions/otp/send-otp.ts
parentbde6f2a25328dd3d48afe9f67a961a323b0e6221 (diff)
fixes SMTP client config in website
Diffstat (limited to 'website/src/actions/otp/send-otp.ts')
-rw-r--r--website/src/actions/otp/send-otp.ts20
1 files changed, 1 insertions, 19 deletions
diff --git a/website/src/actions/otp/send-otp.ts b/website/src/actions/otp/send-otp.ts
index 23f8dc0..6f017af 100644
--- a/website/src/actions/otp/send-otp.ts
+++ b/website/src/actions/otp/send-otp.ts
@@ -1,14 +1,8 @@
import crypto from "node:crypto";
-import nodemailer from "nodemailer";
import { z } from "astro/zod";
import { defineAction } from "astro:actions";
import { db, Otp } from "astro:db";
-import {
- SMTP_HOST,
- SMTP_PASSWORD,
- SMTP_PORT,
- SMTP_USER,
-} from "astro:env/server";
+import { transporter } from "../sendmail";
export default defineAction({
input: z.object({
@@ -49,15 +43,3 @@ to do anything.`,
validUntil: Date.now() + 1000 * 60 * 5,
});
}
-
-const transporter = nodemailer.createTransport({
- host: SMTP_HOST,
- port: SMTP_PORT,
- secure: false,
- authMethod: "PLAIN",
- auth: {
- type: "login",
- user: SMTP_USER,
- pass: SMTP_PASSWORD,
- },
-});