EmailStudioSubmissionGateway
Corex\Email\Studio\EmailStudioSubmissionGateway · class · Add-ons layer
Email Studio adapter for permission-scoped submission reply, resend, and log actions.
Public API
Section titled “Public API”__construct(EmailStudioRepositories $repositories, EmailStudioService $studio, EmailTemplateService $templates, ConfigInterface $config, ReplyComposer $composer, EmailDeliveryContextFactory $delivery)
Section titled “__construct(EmailStudioRepositories $repositories, EmailStudioService $studio, EmailTemplateService $templates, ConfigInterface $config, ReplyComposer $composer, EmailDeliveryContextFactory $delivery)”readiness(): ReplyReadiness
Section titled “readiness(): ReplyReadiness”reply(string $recipient, string $subject, string $htmlBody, ?ReplyConversation $within): MailResult
Section titled “reply(string $recipient, string $subject, string $htmlBody, ?ReplyConversation $within): MailResult”An operator’s manual reply from the Submissions inbox. The operator’s text used to be the entire message body, and replyTo was hard-coded null — while {@see resend()} directly below looked up the template version and layout and rendered through them. So every automated email a site sent was branded and every manual reply arrived unstyled on the client’s default background, ignoring the configured reply-to. Reported from a real build (issue #138, item 3). The message is drawn in the site’s email design, with the same words beside it as plain text (spec 106). It is not run through an Email Studio template: there is no template for “whatever the operator typed”, and one would put a placeholder between the operator and their own words.
conversation(string $recipient, array $attemptIds): ReplyConversation
Section titled “conversation(string $recipient, array $attemptIds): ReplyConversation”Among the attempts named, the emails this person was sent and has: each went to them, left or was kept, and was sent under an id that can be named. Oldest first. An email sent before CoreX chose ids is on record and cannot be continued: it left under an id nothing kept.
preview(string $recipient, string $subject, string $htmlBody): array
Section titled “preview(string $recipient, string $subject, string $htmlBody): array”resend(string $attemptId, string $recipient, array $context): MailResult
Section titled “resend(string $attemptId, string $recipient, array $context): MailResult”resendTo(string $attemptId, array $recipients, array $context): MailResult
Section titled “resendTo(string $attemptId, array $recipients, array $context): MailResult”One email to all of them, rendered from the template version the attempt was sent with.