Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
msveshnikov committed Apr 29, 2024
1 parent 5c8b10c commit 50412c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/email.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 50412c9

Please sign in to comment.