diff --git a/app/api/v1/email-catcher/route.ts b/app/api/v1/email-catcher/route.ts index 1d68836..5e8ba5e 100644 --- a/app/api/v1/email-catcher/route.ts +++ b/app/api/v1/email-catcher/route.ts @@ -12,6 +12,7 @@ export async function POST(req: Request) { return Response.json({ msg: "success" }); } catch (error) { + console.log(error); return Response.json({ statusText: "Server error" }, { status: 500 }); } } diff --git a/lib/dto/email.ts b/lib/dto/email.ts index b56ff7b..2323d1f 100644 --- a/lib/dto/email.ts +++ b/lib/dto/email.ts @@ -42,7 +42,7 @@ export async function createEmail(emailData: OriginalEmail) { messageId: emailData.messageId, replyTo: emailData.replyTo, cc: emailData.cc, - headers: emailData.headers, + headers: "", attachments: JSON.stringify(emailData.attachments), // 转换为 JSON 字符串 createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(),