MessageId
Corex\Mail\MessageId · class · Core layer
The id an email is sent under, which is what a later email names to say it answers this one (spec 106, FR-037). CoreX chooses it. Left to WordPress, its mailer makes one at the moment of sending and there is no reading it back, so nothing could say which email a reply continues. Made from an id the email already has, it is known before the email leaves: the attempt’s own, for an email Email Studio sends; the request’s, for one a site sends through {@see Mailer}. Part of that id and not all of it. WordPress’s mailer rewrites a header it finds too long as an encoded word, which no mail program reads as an id; through PHP’s own mail() that is anything past 47 characters, and a whole id with a host of nine letters is 48. So an id is twenty characters of it where the host leaves room, and as few as ten where it does not: with a host of up to 34 characters the id fits. Ten is forty random bits and twenty is seventy-four, the rest being the same in every such id: one email in more than a site sends. On a longer host an id is over the line, and a reply sent through mail() leaves without naming the email it answers.
Public API
Section titled “Public API”of(string $attemptId, string $host): string
Section titled “of(string $attemptId, string $host): string”isOne(mixed $value): bool
Section titled “isOne(mixed $value): bool”allIn(string $ids): array
Section titled “allIn(string $ids): array”The ids in a string of them, in order: what a References header holds.
hostOf(string $siteAddress): string
Section titled “hostOf(string $siteAddress): string”The host an id is made of, from the site’s address: its name, lower case, without a port. ” for an address that has none a mail server would take for a name.