public function convert(Email $email): \Swift_Message
    {
        $message = $this->createInstance()->setSubject($email->getSubject());
        $message->setBoundary($boundary = \md5(\uniqid()));

        $this->addAddresses($email, $message);
        $this->addParts($email, $message, $boundary);
        $this->addHeaders($email, $message);
        $this->addAttachments($email, $message);

        if ($contentType = $email->getContentType()) {
            $message->setContentType($contentType);
        }

        return $message;
    }
public function convert(Email $email): \Swift_Message
    {
        $message = $this->createInstance()->setSubject($email->getSubject());
        $message->setBoundary($boundary = \md5(\uniqid()));

        $this->addAddresses($email, $message);
        $this->addParts($email, $message, $boundary);
        $this->addHeaders($email, $message);
        $this->addAttachments($email, $message);

        if ($contentType = $email->getContentType()) {
            $message->setContentType($contentType);
        }

        return $message;
    }
public function convert ( Email $ email ) : \ Swift_Message { $ message = $ this -> createInstance ( ) -> setSubject ( $ email -> getSubject ( ) ) ; $ message -> setBoundary ( $ boundary = \ md5 ( \ uniqid ( ) ) ) ; $ this -> addAddresses ( $ email , $ message ) ; $ this -> addParts ( $ email , $ message , $ boundary ) ; $ this -> addHeaders ( $ email , $ message ) ; $ this -> addAttachments ( $ email , $ message ) ; if ( $ contentType = $ email -> getContentType ( ) ) { $ message -> setContentType ( $ contentType ) ; } return $ message ; }
Converts an Email object into a \Swift_Message object.

@param Email $email

@return \Swift_Message
Converts an Email object into a \ Swift_Message object .