From 48ca4c2a03df35b8d5d7555ac1f288f3daabc890 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Thu, 8 Jan 2026 21:13:38 +0000 Subject: fixes SMTP client config in website --- website/src/actions/otp/send-otp.ts | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'website/src/actions/otp/send-otp.ts') 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, - }, -}); -- cgit v1.2.3