public function sendFeebackMessage(Feedback $feedback, $feedbackEmailFrom, $feedbackEmailTo)
    {
        $message = Swift_Message::newInstance();

        $message->setSubject($this->translator->trans('eZ Demobundle Feedback form'))
            ->setFrom($feedbackEmailFrom)
            ->setTo($feedbackEmailTo)
            ->setBody(
                // Using template engine to generate the message based on a template
                $this->templating->render(
                    'eZDemoBundle:email:feedback_form.txt.twig',
                    array(
                        'firstname' => $feedback->firstName,
                        'lastname' => $feedback->lastName,
                        'email' => $feedback->email,
                        'subject' => $feedback->subject,
                        'country' => $feedback->country,
                        'message' => $feedback->message,
                    )
                )
            );

        $this->mailer->send($message);
    }
public function sendFeebackMessage(Feedback $feedback, $feedbackEmailFrom, $feedbackEmailTo)
    {
        $message = Swift_Message::newInstance();

        $message->setSubject($this->translator->trans('eZ Demobundle Feedback form'))
            ->setFrom($feedbackEmailFrom)
            ->setTo($feedbackEmailTo)
            ->setBody(
                // Using template engine to generate the message based on a template
                $this->templating->render(
                    'eZDemoBundle:email:feedback_form.txt.twig',
                    array(
                        'firstname' => $feedback->firstName,
                        'lastname' => $feedback->lastName,
                        'email' => $feedback->email,
                        'subject' => $feedback->subject,
                        'country' => $feedback->country,
                        'message' => $feedback->message,
                    )
                )
            );

        $this->mailer->send($message);
    }
public function sendFeebackMessage ( Feedback $ feedback , $ feedbackEmailFrom , $ feedbackEmailTo ) { $ message = Swift_Message :: newInstance ( ) ; $ message -> setSubject ( $ this -> translator -> trans ( 'eZ Demobundle Feedback form' ) ) -> setFrom ( $ feedbackEmailFrom ) -> setTo ( $ feedbackEmailTo ) -> setBody ( // Using template engine to generate the message based on a template $ this -> templating -> render ( 'eZDemoBundle:email:feedback_form.txt.twig' , array ( 'firstname' => $ feedback -> firstName , 'lastname' => $ feedback -> lastName , 'email' => $ feedback -> email , 'subject' => $ feedback -> subject , 'country' => $ feedback -> country , 'message' => $ feedback -> message , ) ) ) ; $ this -> mailer -> send ( $ message ) ; }
Sends an email based on a feedback form.

@param \EzSystems\DemoBundle\Entity\Feedback $feedback
@param string $feedbackEmailFrom  Email address sending feedback form
@param string $feedbackEmailTo Email address feedback forms will be sent to
Sends an email based on a feedback form .