diff --git a/app/(password-reset)/forgot-password/emailforgotpassword.ts b/app/(password-reset)/forgot-password/emailforgotpassword.ts index 49091f9..71435e5 100644 --- a/app/(password-reset)/forgot-password/emailforgotpassword.ts +++ b/app/(password-reset)/forgot-password/emailforgotpassword.ts @@ -8,11 +8,12 @@ import { redirect } from "next/navigation"; const resend = new Resend(process.env.NEXT_PUBLIC_RESEND_API_KEY); const DOMAIN = process.env.DOMAIN || "localhost:3000"; const PROTOCOL = process.env.NODE_ENV === "production" ? "https" : "http"; +const EMAIL = process.env.EMAIL || ""; const sendEmail = async (email: string, token: string, userName: string) => { try { const { data } = await resend.emails.send({ - from: "Password Reset ", + from: `Password Reset ${EMAIL}`, to: [email], subject: "Reset Password Request", text: `Hello ${userName}, someone (hopefully you) requested a password reset for this account. If you did want to reset your password, please click here: ${PROTOCOL}://${DOMAIN}/password-reset/${token} diff --git a/app/(password-reset)/forgot-password/page.tsx b/app/(password-reset)/forgot-password/page.tsx index e9b6f25..87fbd3a 100644 --- a/app/(password-reset)/forgot-password/page.tsx +++ b/app/(password-reset)/forgot-password/page.tsx @@ -17,8 +17,8 @@ export default function ForgotPassword() { }; return ( -
- +
+
{" "}

Reset password

@@ -29,12 +29,9 @@ export default function ForgotPassword() { {error &&

{error}

} - + - Return to Login + Return to Login