diff options
Diffstat (limited to 'website/src/actions/otp')
| -rw-r--r-- | website/src/actions/otp/send-otp.ts | 20 |
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, - }, -}); |
