protected function renderEmail(
        $subject,
        $receiverEmail,
        array $context = []
    ) {
        $message = Swift_Message::newInstance()
            ->setSubject($subject)
            ->setFrom($this->fromEmail)
            ->setTo($receiverEmail)
            ->setContentType('text/html')
            ->setBody(
                $this->templatingEngine->render(
                    $this->template,
                    array_merge(
                        $context,
                        ['layout' => $this->layout]
                    )
                )
            );

        $this
            ->mailer
            ->send($message);

        return $this;
    }
protected function renderEmail(
        $subject,
        $receiverEmail,
        array $context = []
    ) {
        $message = Swift_Message::newInstance()
            ->setSubject($subject)
            ->setFrom($this->fromEmail)
            ->setTo($receiverEmail)
            ->setContentType('text/html')
            ->setBody(
                $this->templatingEngine->render(
                    $this->template,
                    array_merge(
                        $context,
                        ['layout' => $this->layout]
                    )
                )
            );

        $this
            ->mailer
            ->send($message);

        return $this;
    }
protected function renderEmail ( $ subject , $ receiverEmail , array $ context = [ ] ) { $ message = Swift_Message :: newInstance ( ) -> setSubject ( $ subject ) -> setFrom ( $ this -> fromEmail ) -> setTo ( $ receiverEmail ) -> setContentType ( 'text/html' ) -> setBody ( $ this -> templatingEngine -> render ( $ this -> template , array_merge ( $ context , [ 'layout' => $ this -> layout ] ) ) ) ; $ this -> mailer -> send ( $ message ) ; return $ this ; }
Render email.

@param string $subject       Email subject
@param string $receiverEmail Receiver Email
@param array  $context       Context

@return $this Self object
Render email .