Skip to content
Corex

SubmissionReplyRecord

Corex\Config\Submissions\SubmissionReplyRecord · class · Config layer

A reply as it is kept with its submission: what was said, by whom, when, and what happened each time it was sent (spec 106, FR-021). The message is kept as it was reduced, before any email template: the template can change, and what the team reads is what their colleague wrote.

__construct(string $id, string $subject, string $bodyHtml, int $actorId, string $createdAt, array $attempts, bool $inConversation)

Section titled “__construct(string $id, string $subject, string $bodyHtml, int $actorId, string $createdAt, array $attempts, bool $inConversation)”

sent(SubmissionReply $reply, int $actorId, MailResult $result, bool $inConversation): self

Section titled “sent(SubmissionReply $reply, int $actorId, MailResult $result, bool $inConversation): self”

canBeSentAgain(DateTimeImmutable $now): bool

Section titled “canBeSentAgain(DateTimeImmutable $now): bool”

Whether this reply can be sent another time (spec 106, FR-022): its last sending ended with the person not having it, and nothing is on its way to them. By the states that say so, and no other: a state nothing here knows is not taken to mean the reply did not arrive. A reply kept on a site that keeps its email is not one that failed. A sending somebody began is in the way of another until it ends, or until it has plainly been abandoned.

beingSentAgain(DateTimeImmutable $now): self

Section titled “beingSentAgain(DateTimeImmutable $now): self”

This reply with a sending begun: written down before the email is handed over, so that a second person pressing the same button finds it already being sent.

sentAgain(MailResult $result, bool $inConversation): self

Section titled “sentAgain(MailResult $result, bool $inConversation): self”

This reply with the sending that was begun ended: what happened takes the place of the sending begun. What was written, by whom and when are as they were.

What happened the last time this reply was sent.

The mail system’s own words about the last sending.