PHPMailer::isMail PHP Method

isMail() public method

Send messages using PHP's mail() function.
public isMail ( ) : void
return void
    public function isMail()
    {
        $this->Mailer = 'mail';
    }

Usage Example

Example #1
0
 public function init()
 {
     $this->_mailer = new \PHPMailer();
     switch ($this->method) {
         case 'smtp':
             $this->_mailer->isSMTP();
             $this->_mailer->Host = $this->smtp['host'];
             if (!empty($this->smtp['username'])) {
                 $this->_mailer->SMTPAuth = true;
                 $this->_mailer->Username = $this->smtp['username'];
                 $this->_mailer->Password = $this->smtp['password'];
             } else {
                 $this->_mailer->SMTPAuth = false;
             }
             if (isset($this->smtp['port'])) {
                 $this->_mailer->Port = $this->smtp['port'];
             }
             if (isset($this->smtp['secure'])) {
                 $this->_mailer->SMTPSecure = $this->smtp['secure'];
             }
             if (isset($this->smtp['debug'])) {
                 $this->_mailer->SMTPDebug = (int) $this->smtp['debug'];
             }
             break;
         case 'sendmail':
             $this->_mailer->isSendmail();
             break;
         default:
             $this->_mailer->isMail();
     }
     $this->_mailer->CharSet = \Yii::app()->charset;
     parent::init();
 }
All Usage Examples Of PHPMailer::isMail