From 8505e7a9aede5217ef6d348edfb0c22bd22ec2c5 Mon Sep 17 00:00:00 2001 From: h4erj Date: Wed, 24 Jun 2026 10:53:29 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E5=8F=91=E9=80=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api-server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api-server.js b/api-server.js index 78f6bd0..1a46eaa 100644 --- a/api-server.js +++ b/api-server.js @@ -148,6 +148,7 @@ async function handleContact(req, res) { messages.push(item); writeMessages(messages); + console.log('准备发送邮件通知至:', MAIL_TO); const mailText = `姓名:${item.name} 邮箱:${item.email || '未填写'} 电话:${item.countryCode} ${item.phone || '未填写'} @@ -155,7 +156,7 @@ async function handleContact(req, res) { 消息内容:${item.message} 提交时间:${item.createdAt}`; - sendMail(`【海古纪-联系我们】新消息来自 ${item.name}`, mailText).catch(() => {}); + sendMail(`【海古纪-联系我们】新消息来自 ${item.name}`, mailText).catch(err => console.error('邮件发送失败:', err.message)); sendJson(res, 201, { ok: true, id: item.id }); } catch (error) {