From c550465f377cbd91c8330653e1808e38b7f0fccb Mon Sep 17 00:00:00 2001
From: hiralph <hi@hizmz.com>
Date: Mon, 20 May 2019 17:15:37 +0800
Subject: [PATCH] 修复无法自定义邮件发件人名称的Bug

---
 application/common/library/Email.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/application/common/library/Email.php b/application/common/library/Email.php
index acd2498..bb236fe 100644
--- a/application/common/library/Email.php
+++ b/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']);
     }
 
     /**
--
libgit2 0.24.0