diff options
author | Elizabeth Hunt <me@liz.coffee> | 2025-08-18 11:00:23 -0700 |
---|---|---|
committer | Elizabeth Hunt <me@liz.coffee> | 2025-08-18 11:00:23 -0700 |
commit | fd4e7ac4466593605c18b1b5fab4f76db5326520 (patch) | |
tree | 5bccba2958d0eddbeae2e083477df1d253acfaed | |
parent | 30889fa8a2e0cc2751bb9119c83294ebfe029f6f (diff) | |
download | uptime-fd4e7ac4466593605c18b1b5fab4f76db5326520.tar.gz uptime-fd4e7ac4466593605c18b1b5fab4f76db5326520.zip |
-rw-r--r-- | lib/email.ts | 6 |
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; } |