src/Viserio/Component/Mail/Transport/PostmarkTransport.php
protected function processRecipients(array $payload, Swift_Mime_SimpleMessage $message): array
    {
        $payload['From']    = \implode(',', $this->convertEmailsArray($message->getFrom()));
        $payload['To']      = \implode(',', $this->convertEmailsArray($message->getTo()));
        $payload['Subject'] = $message->getSubject() ?? '';

        $tags = $message->getHeaders()->getAll('tag');
        /** @var \Swift_Mime_Header $tag */
        $tag = \end($tags);

        $payload['Tag'] = $tag !== false ? $tag->getFieldBody() : '';

        $cc = $message->getCc();

        if (\is_array($cc)) {
            $payload['Cc'] = \implode(',', $this->convertEmailsArray($cc));
        }

        $replyTo = $message->getReplyTo();

        if (\is_string($replyTo)) {
            $payload['ReplyTo'] = $replyTo;
        }

        $bcc = $message->getBcc();

        if (\is_array($bcc)) {
            $payload['Bcc'] = \implode(',', $this->convertEmailsArray($bcc));
        }

        return $payload;
    }
protected function processRecipients(array $payload, Swift_Mime_SimpleMessage $message): array
    {
        $payload['From']    = \implode(',', $this->convertEmailsArray($message->getFrom()));
        $payload['To']      = \implode(',', $this->convertEmailsArray($message->getTo()));
        $payload['Subject'] = $message->getSubject() ?? '';

        $tags = $message->getHeaders()->getAll('tag');
        /** @var \Swift_Mime_Header $tag */
        $tag = \end($tags);

        $payload['Tag'] = $tag !== false ? $tag->getFieldBody() : '';

        $cc = $message->getCc();

        if (\is_array($cc)) {
            $payload['Cc'] = \implode(',', $this->convertEmailsArray($cc));
        }

        $replyTo = $message->getReplyTo();

        if (\is_string($replyTo)) {
            $payload['ReplyTo'] = $replyTo;
        }

        $bcc = $message->getBcc();

        if (\is_array($bcc)) {
            $payload['Bcc'] = \implode(',', $this->convertEmailsArray($bcc));
        }

        return $payload;
    }
Applies the recipients of the message into the API Payload.

@param array                     $payload
@param \Swift_Mime_SimpleMessage $message

@return array