diff --git a/src/MailWrapper.php b/src/MailWrapper.php index ca9ff02..17e9d7d 100644 --- a/src/MailWrapper.php +++ b/src/MailWrapper.php @@ -6,7 +6,7 @@ use PHPMailer\PHPMailer\Exception; class MailWrapper { - private $fqm, $host, $protocol, $replyto, $from; + private $fqm, $host, $protocol, $replyto, $from, $fromName; private $recipient; @@ -33,7 +33,7 @@ class MailWrapper $this->mailer->SMTPSecure = $this->protocol; $this->mailer->Port = ($this->protocol == "tls") ? '587' : '465'; - $this->mailer->setFrom($this->from); + $this->mailer->setFrom($this->from, $this->fromName); $this->mailer->addAddress($this->recipient); $this->mailer->addReplyTo($this->replyto); @@ -55,9 +55,10 @@ class MailWrapper /** * @param mixed $from */ - public function setFrom($from) + public function setFrom($from, $fromName) { $this->from = $from; + $this->fromName = $fromName; return $this; }