public function get($reference, $to, array $parameters = array(), $locale = null)
    {
        try {
            $email = $this->getEmail($reference);
            return $this->generateMessage($email, $to, $parameters, $locale);
        } catch (ReferenceNotFoundException $e) {
            return $this->generateExceptionMessage($reference);
        }
    }
public function get($reference, $to, array $parameters = array(), $locale = null)
    {
        try {
            $email = $this->getEmail($reference);
            return $this->generateMessage($email, $to, $parameters, $locale);
        } catch (ReferenceNotFoundException $e) {
            return $this->generateExceptionMessage($reference);
        }
    }
public function get ( $ reference , $ to , array $ parameters = array ( ) , $ locale = null ) { try { $ email = $ this -> getEmail ( $ reference ) ; return $ this -> generateMessage ( $ email , $ to , $ parameters , $ locale ) ; } catch ( ReferenceNotFoundException $ e ) { return $ this -> generateExceptionMessage ( $ reference ) ; } }
Find an email template and create a swift message.

@param string $reference
@param mixed  $to
@param array  $parameters
@param string $locale

@throws \RuntimeException

@return \Swift_Message
Find an email template and create a swift message .