diff options
| author | Joe Carstairs <me@joeac.net> | 2026-03-14 08:52:33 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-03-14 08:52:33 +0000 |
| commit | 7a7aab501a197dc6bfaf50c48842444d22078a03 (patch) | |
| tree | c6f0ec8e3e46a74dda52cfcdf9252553c4e6fb7c /website | |
| parent | 82daa6fde962f6042317eb2ac0de547552a45f85 (diff) | |
parameterises From address for OTP emails
Diffstat (limited to 'website')
| -rw-r--r-- | website/src/actions/otp/send-otp.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/website/src/actions/otp/send-otp.ts b/website/src/actions/otp/send-otp.ts index ee7fe35..2fbe2fc 100644 --- a/website/src/actions/otp/send-otp.ts +++ b/website/src/actions/otp/send-otp.ts @@ -3,7 +3,7 @@ import { z } from "astro/zod"; import { defineAction } from "astro:actions"; import { db, gte, Otp, SentEmails } from "astro:db"; import { transporter } from "../sendmail"; -import { MAX_DAILY_EMAILS } from "astro:env/server"; +import { LOCAL_SMTP_ENVELOPE_FROM, MAX_DAILY_EMAILS } from "astro:env/server"; export default defineAction({ input: z.object({ @@ -38,7 +38,7 @@ async function sendOtp({ email, name }: OtpParams) { } const info = await transporter.sendMail({ - from: `"Joe Carstairs" <me@joeac.net>`, + from: LOCAL_SMTP_ENVELOPE_FROM, to: `${name ? `"${name}" ` : ""}<${email}>`, subject: `joeac.net: your OTP is ${otpPretty}`, text: ` |
