src/Email.php
public function getMailer()
    {
        if (is_null($this->mailer)) {
            if(class_exists('\Swift'))
            {
                if(version_compare(\Swift::VERSION, 4, '<=') && version_compare(\Swift::VERSION, 3, '>='))
                {
                    $mailer = new Email\Swift3($this->config);
                }
                else {
                    $mailer = new Email\Swift5($this->config);
                }
            }
            else {
                $mailer = new Email\Swift5($this->config); 
            }
            
            $this->mailer = $mailer;
        }
        
        return $this->mailer;
    }
public function getMailer()
    {
        if (is_null($this->mailer)) {
            if(class_exists('\Swift'))
            {
                if(version_compare(\Swift::VERSION, 4, '<=') && version_compare(\Swift::VERSION, 3, '>='))
                {
                    $mailer = new Email\Swift3($this->config);
                }
                else {
                    $mailer = new Email\Swift5($this->config);
                }
            }
            else {
                $mailer = new Email\Swift5($this->config); 
            }
            
            $this->mailer = $mailer;
        }
        
        return $this->mailer;
    }
public function getMailer ( ) { if ( is_null ( $ this -> mailer ) ) { if ( class_exists ( '\Swift' ) ) { if ( version_compare ( \ Swift :: VERSION , 4 , '<=' ) && version_compare ( \ Swift :: VERSION , 3 , '>=' ) ) { $ mailer = new Email \ Swift3 ( $ this -> config ) ; } else { $ mailer = new Email \ Swift5 ( $ this -> config ) ; } } else { $ mailer = new Email \ Swift5 ( $ this -> config ) ; } $ this -> mailer = $ mailer ; } return $ this -> mailer ; }
Returns an instance of the mail object

@return Email\SwiftAbstract
Returns an instance of the mail object