From 2908eb90afcd93fc0ea5bf7d3bac97b22f8e3d8b Mon Sep 17 00:00:00 2001 From: eoao Date: Fri, 26 Sep 2025 00:10:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9B=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E6=8E=A5=E6=94=B6=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mail-worker/src/email/email.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mail-worker/src/email/email.js b/mail-worker/src/email/email.js index 1259e0a..d4cb543 100644 --- a/mail-worker/src/email/email.js +++ b/mail-worker/src/email/email.js @@ -103,7 +103,11 @@ export async function email(message, env, ctx) { } - const toName = email.to.find(item => item.address === message.to)?.name || ''; + let toName = '' + + if (Array.isArray(email.to)) { + toName = email.to.find(item => item.address === message.to)?.name || ''; + } const params = { toEmail: message.to,