summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/email.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/email.ts b/lib/email.ts
index 38beb0c..d889900 100644
--- a/lib/email.ts
+++ b/lib/email.ts
@@ -118,7 +118,7 @@ export class Inbox {
public async close() {
await this.recv.mailboxClose().then(() => this.recv.logout());
this.lock!.peek((l) => l.get().release())
- .peek(t => t.trace.trace(Inbox.Metrics.LOCK))
+ .peek((t) => t.trace.trace(Inbox.Metrics.LOCK))
.peek((res) => res.trace.traceScope(LogLevel.INFO).trace('Released lock'))
.get();
delete this.lock;
@@ -185,8 +185,8 @@ export class Inbox {
const subjectMatches = email.subject === message.envelope?.subject;
const bodyMatches = message.bodyParts?.get('text')?.toString().trim() === email.text.trim();
const headers = message.headers?.toLocaleString();
- const fromMatches = headers?.includes(`Return-Path: <${email.from}>`);
- const toMatches = headers?.includes(`Delivered-To: ${email.to}`);
+ const fromMatches = headers?.includes(`From: ${email.from}`);
+ const toMatches = headers?.includes(`To: ${email.to}`);
return subjectMatches && bodyMatches && fromMatches && toMatches;
}