Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

An uncertain SMTP result can approve the card again and send a second Message-ID

Closed
#101 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 2 days

@agentvivekkumar is already working on this.

Since Oct 10, 2026.

Assessment

This issue has not been assessed yet.

Description

Summary

handleMailRequest() calls markSending() before SMTP. sendOnce() creates a new Message-ID on every attempt.

If beforeSmtp() refuses the send, SMTP is not called. unmarkSending() correctly returns the card to approved.

If sendMail() fails with timeout or network, sendOnce() searches Sent. When Sent has no hit, the catch still calls unmarkSending(). A retry calls newMessageId() again. recordSent() writes the journal only after a confirmed send.

Why this matters

The server can accept the message and then drop the connection. Sent can be slow. The retry can send a second message. Reusing one Message-ID is not a guarantee, because the retry does not reuse it.

Evidence
  • sendOnce() and recordSent() in src/main/mail.ts
  • The approved-send catch in handleMailRequest() in src/main/mail.ts
  • unmarkSending() in src/main/mailApprovals.ts
  • proposalSendProblem() in src/shared/mailProposals.ts already blocks a card in sending

This is not the Can send journal item in TODOS.md. That item is a record before SMTP for Can send.

Change

Keep unmarkSending() when the failure happens before sendMail().

For timeout or network after sendMail() starts, leave the card in sending when Sent does not show the message. Show "check Sent". Add an owner action that sets the card back to approved only after the owner checks Sent.

Do not block every retry for every failure. Do not promise exactly-once SMTP delivery.

Test plan
  • Fake SMTP accepts the message, then drops the connection. Sent returns no hit.
  • sendMail runs once. The card stays sending.
  • A second send with the same proposal id does not call sendMail.
  • A refusal from beforeSmtp() returns the card to approved and does not call sendMail.

Checkout: main at 0ef922bac25d6aad226243c72a0a7f142cfacfec.

Dominant language
TypeScript
Stars
273
Forks
211
Avg merge
2d 10h
Merged PRs (30d)
357

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from agentvivekkumar/dontbemichael

All issues in agentvivekkumar/dontbemichael

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.