// Magic-link email body builder. Returns { subject, text, html } for // nodemailer. Keeps the HTML and text in sync — both carry the same // verifyUrl and the same expiry copy. // // Style is deliberately minimal: one paragraph, one button, no images, // no fancy CSS. Spam filters like simple emails; users skim them and // click the link. Anything fancier risks the email landing in spam, // which is fatal to a magic-link auth flow. // renderMagicLinkEmail({ verifyUrl, brandName, expiresInMinutes }) // → { subject, text, html } export function renderMagicLinkEmail({ verifyUrl, brandName = "Recaps", expiresInMinutes = 15, }) { const subject = `Sign in to ${brandName}`; const text = [ `Sign in to ${brandName} by opening this link:`, "", verifyUrl, "", `This link expires in ${expiresInMinutes} minutes and can only be used once.`, "", `If you didn't request this, you can safely ignore this email — no one else can use this link without access to your inbox.`, ].join("\n"); // Inline-styled HTML. Most email clients strip