From 50412c9e23e4ed34231f44d585dc7cadd2761f60 Mon Sep 17 00:00:00 2001 From: Max Sveshnikov Date: Mon, 29 Apr 2024 10:24:23 +0200 Subject: [PATCH] Minor --- server/email.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/email.js b/server/email.js index 205a0c28..bf7deb3f 100644 --- a/server/email.js +++ b/server/email.js @@ -41,7 +41,7 @@ export async function handleIncomingEmails() { console.log("New email found"); const emailFrom = await simpleParser(emailBody); const user = await User.findOne({ - email: emailFrom?.from?.value?.[0]?.address, + email: { $regex: new RegExp(emailFrom?.from?.value?.[0]?.address, "i") }, }); if (user && emailBody) { const attachments = emailFrom.attachments;