Mailer/Mailer.php
public function setTemplate($templateName)
    {
    	if($templateName instanceof MailTemplate)
    	{
    		$this->template = $templateName;
    	}
    	elseif (!$this->template = $this->mailerManager->getRepository()->findOneBy(array('name' => $templateName)))
    	{
    		$this->template =  $this->mailerManager->createDefault($templateName);
    	}
    
    	return $this;
    }
public function setTemplate($templateName)
    {
    	if($templateName instanceof MailTemplate)
    	{
    		$this->template = $templateName;
    	}
    	elseif (!$this->template = $this->mailerManager->getRepository()->findOneBy(array('name' => $templateName)))
    	{
    		$this->template =  $this->mailerManager->createDefault($templateName);
    	}
    
    	return $this;
    }
public function setTemplate ( $ templateName ) { if ( $ templateName instanceof MailTemplate ) { $ this -> template = $ templateName ; } elseif ( ! $ this -> template = $ this -> mailerManager -> getRepository ( ) -> findOneBy ( array ( 'name' => $ templateName ) ) ) { $ this -> template = $ this -> mailerManager -> createDefault ( $ templateName ) ; } return $ this ; }
Set a template to the mail

@return Mailer $this
Set a template to the mail