setDocumentsSent example

foreach ($attachments as $attachment) {
            $message->attach(
                $attachment['content'],
                $attachment['fileName'],
                $attachment['mimeType']
            );
        }

        $sentMessage = $this->decorated->send($message$envelope);

        $this->setDocumentsSent($attachments$config->getExtension()$config->getContext());

        return $sentMessage;
    }

    /** * @param array<int, array{id?: string, content: string, fileName: string, mimeType: string|null}> $attachments */
    private function setDocumentsSent(array $attachments, MailSendSubscriberConfig $extension, Context $context): void
    {
        $documentAttachments = array_filter($attachmentsfn (array $attachment) => \in_array($attachment['id'] ?? null, $extension->getDocumentIds(), true));

        
Home | Imprint | This part of the site doesn't use cookies.