浏览代码

!122 修复无法自定义邮件发件人名称的Bug
Merge pull request !122 from Ralph/master

Karson 6 年之前
父节点
当前提交
cfba7e04c1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      application/common/library/Email.php

+ 2 - 2
application/common/library/Email.php

@@ -64,13 +64,13 @@ class Email
         $this->mail->isSMTP();
         $this->mail->SMTPAuth = true;
         $this->mail->Host = $this->options['mail_smtp_host'];
-        $this->mail->Username = $this->options['mail_smtp_user'];
+        $this->mail->Username = $this->options['mail_from'];
         $this->mail->Password = $this->options['mail_smtp_pass'];
         $this->mail->SMTPSecure = isset($securArr[$this->options['mail_verify_type']]) ? $securArr[$this->options['mail_verify_type']] : '';
         $this->mail->Port = $this->options['mail_smtp_port'];
 
         //设置发件人
-        $this->from($this->options['mail_from']);
+        $this->from($this->options['mail_from'], $this->options['mail_smtp_user']);
     }
 
     /**