Services/AzineTwigSwiftMailer.php
protected function sendMessage($templateName, $context, $fromEmail, $toEmail)
    {
        // get the subject from the template
        // => make sure the subject block exists in your fos-templates (FOSUserBundle:Registration:email.txt.twig & FOSUserBundle:Resetting:email.txt.twig)
        $twigTemplate = $this->loadTemplate($templateName);
        $subject = $twigTemplate->renderBlock('subject', $context);

        return $this->sendSingleEmail($toEmail, null, $subject, $context, $templateName, $this->translator->getLocale(), $fromEmail);
    }
protected function sendMessage($templateName, $context, $fromEmail, $toEmail)
    {
        // get the subject from the template
        // => make sure the subject block exists in your fos-templates (FOSUserBundle:Registration:email.txt.twig & FOSUserBundle:Resetting:email.txt.twig)
        $twigTemplate = $this->loadTemplate($templateName);
        $subject = $twigTemplate->renderBlock('subject', $context);

        return $this->sendSingleEmail($toEmail, null, $subject, $context, $templateName, $this->translator->getLocale(), $fromEmail);
    }
protected function sendMessage ( $ templateName , $ context , $ fromEmail , $ toEmail ) { // get the subject from the template // => make sure the subject block exists in your fos-templates (FOSUserBundle:Registration:email.txt.twig & FOSUserBundle:Resetting:email.txt.twig) $ twigTemplate = $ this -> loadTemplate ( $ templateName ) ; $ subject = $ twigTemplate -> renderBlock ( 'subject' , $ context ) ; return $ this -> sendSingleEmail ( $ toEmail , null , $ subject , $ context , $ templateName , $ this -> translator -> getLocale ( ) , $ fromEmail ) ; }
Override the fosuserbundles original sendMessage, to embed template variables etc. into html-emails.

@param string $templateName
@param array  $context
@param string $fromEmail
@param string $toEmail

@return bool true if the mail was sent successfully, else false
Override the fosuserbundles original sendMessage to embed template variables etc . into html - emails .