lib/Mailer/Mailjet.php
protected function format(MessageInterface $message)
    {
        $parameters = [
            'From'     => $this->buildSenderField($message->getFrom()),
            'To'       => $this->buildRecipientsField($message->getTo()),
            'Cc'       => $this->buildRecipientsField($message->getCc()),
            'Bcc'      => $this->buildRecipientsField($message->getBcc()),
            'Subject'  => $message->getSubject(),
            'Headers'  => $message->getHeaders(),
            'HTMLPart' => $message->getHtml(),
            'TextPart' => $message->getText(),
            'ReplyTo'  => $this->buildSenderField($message->getReplyTo()),
        ];

        $attachments = $this->processAttachments($message);
        if ($attachments) {
            if ($attachments['attached']) {
                $parameters['Attachments'] = $attachments['attached'];
            }

            if ($attachments['inlined']) {
                $parameters['InlinedAttachments'] = $attachments['inlined'];
            }
        }

        if ($message instanceof MetadataAwareInterface) {
            $parameters['EventPayload'] = $message->getMetadata();
        }

        if ($message instanceof TaggableInterface) {
            $parameters['MonitoringCategory'] = $message->getTag();
        }

        return json_encode(['Messages' => [array_filter($parameters)]]);
    }
protected function format(MessageInterface $message)
    {
        $parameters = [
            'From'     => $this->buildSenderField($message->getFrom()),
            'To'       => $this->buildRecipientsField($message->getTo()),
            'Cc'       => $this->buildRecipientsField($message->getCc()),
            'Bcc'      => $this->buildRecipientsField($message->getBcc()),
            'Subject'  => $message->getSubject(),
            'Headers'  => $message->getHeaders(),
            'HTMLPart' => $message->getHtml(),
            'TextPart' => $message->getText(),
            'ReplyTo'  => $this->buildSenderField($message->getReplyTo()),
        ];

        $attachments = $this->processAttachments($message);
        if ($attachments) {
            if ($attachments['attached']) {
                $parameters['Attachments'] = $attachments['attached'];
            }

            if ($attachments['inlined']) {
                $parameters['InlinedAttachments'] = $attachments['inlined'];
            }
        }

        if ($message instanceof MetadataAwareInterface) {
            $parameters['EventPayload'] = $message->getMetadata();
        }

        if ($message instanceof TaggableInterface) {
            $parameters['MonitoringCategory'] = $message->getTag();
        }

        return json_encode(['Messages' => [array_filter($parameters)]]);
    }
protected function format ( MessageInterface $ message ) { $ parameters = [ 'From' => $ this -> buildSenderField ( $ message -> getFrom ( ) ) , 'To' => $ this -> buildRecipientsField ( $ message -> getTo ( ) ) , 'Cc' => $ this -> buildRecipientsField ( $ message -> getCc ( ) ) , 'Bcc' => $ this -> buildRecipientsField ( $ message -> getBcc ( ) ) , 'Subject' => $ message -> getSubject ( ) , 'Headers' => $ message -> getHeaders ( ) , 'HTMLPart' => $ message -> getHtml ( ) , 'TextPart' => $ message -> getText ( ) , 'ReplyTo' => $ this -> buildSenderField ( $ message -> getReplyTo ( ) ) , ] ; $ attachments = $ this -> processAttachments ( $ message ) ; if ( $ attachments ) { if ( $ attachments [ 'attached' ] ) { $ parameters [ 'Attachments' ] = $ attachments [ 'attached' ] ; } if ( $ attachments [ 'inlined' ] ) { $ parameters [ 'InlinedAttachments' ] = $ attachments [ 'inlined' ] ; } } if ( $ message instanceof MetadataAwareInterface ) { $ parameters [ 'EventPayload' ] = $ message -> getMetadata ( ) ; } if ( $ message instanceof TaggableInterface ) { $ parameters [ 'MonitoringCategory' ] = $ message -> getTag ( ) ; } return json_encode ( [ 'Messages' => [ array_filter ( $ parameters ) ] ] ) ; }
{@inheritdoc}
{