From 44982a2878add210bbba24ea8d90d73549667c11 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 14 Apr 2026 12:54:25 -0400 Subject: [PATCH] feat: add optional plain-text fallback to sendEmail Co-Authored-By: Claude Opus 4.6 (1M context) --- src/lib/email/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/email/index.ts b/src/lib/email/index.ts index f511901..a6c63ad 100644 --- a/src/lib/email/index.ts +++ b/src/lib/email/index.ts @@ -38,6 +38,7 @@ export async function sendEmail( subject: string, html: string, from?: string, + text?: string, ): Promise { const transporter = createTransporter(); @@ -46,12 +47,10 @@ export async function sendEmail( to: Array.isArray(to) ? to.join(', ') : to, subject, html, + ...(text ? { text } : {}), }); - logger.debug( - { messageId: info.messageId, to, subject }, - 'Email sent', - ); + logger.debug({ messageId: info.messageId, to, subject }, 'Email sent'); return info; }