Hacker News new | ask | show | jobs
by lisper 449 days ago
> as long as you include information the user can use to dedupe manually

There is an existing standard for this in the form of the message-id header.

1 comments

I'm confused by this discussion as this back/forth makes it sound like this is some kind of little-known e-mail feature, but every single e-mail must have this unique-id, so how is this problem even coming up in the first place?
The last time I looked into this, which was admittedly a long time ago, message-id wasn’t used by all clients for deduping and you had to assume that it wouldn’t be, so you had to include manual deduping information—-order number etc…
If you don't generate the message ID far enough upstream, the "same" email will be sent with two different unique IDs.
AFAIK, SMTP requires the message-id header, so this "upstream" of which you speak must be outside of the scope of email infrastructure. In this case, looking at this article, the API for sending an email using broken-apart components--a body and recipients and subject--is missing what should be a required parameter for at least a fragment of the message-id, if not the entire thing. Like, this code must be generating a new/random message-id internally for the messages it constructs for them to even be sendable... that, or the API it is itself using to send mail is itself broken by not exposing this detail.