src/Viserio/Component/Mail/Transport/MailgunTransport.php
public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null): int
    {
        $this->beforeSendPerformed($message);

        $options = ['auth' => ['api', $this->key]];

        $options['multipart'] = [
            ['name' => 'to', 'contents' => $this->getTo($message)],
            ['name' => 'cc', 'contents' => $this->getCc($message)],
            ['name' => 'bcc', 'contents' => $this->getBcc($message)],
            ['name' => 'message', 'contents' => $message->toString(), 'filename' => 'message.mime'],
        ];

        $this->client->post($this->url, $options);

        $this->sendPerformed($message);

        return $this->numberOfRecipients($message);
    }
public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null): int
    {
        $this->beforeSendPerformed($message);

        $options = ['auth' => ['api', $this->key]];

        $options['multipart'] = [
            ['name' => 'to', 'contents' => $this->getTo($message)],
            ['name' => 'cc', 'contents' => $this->getCc($message)],
            ['name' => 'bcc', 'contents' => $this->getBcc($message)],
            ['name' => 'message', 'contents' => $message->toString(), 'filename' => 'message.mime'],
        ];

        $this->client->post($this->url, $options);

        $this->sendPerformed($message);

        return $this->numberOfRecipients($message);
    }
{@inheritdoc}