From d2592ed0d024c3ea5c301a7203097aa7c6c97ead Mon Sep 17 00:00:00 2001 From: CGDF <17256673+CGDF-Github@users.noreply.github.com> Date: Tue, 27 Nov 2018 02:29:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmailgun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/Mail/Mailgun.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/Services/Mail/Mailgun.php b/app/Services/Mail/Mailgun.php index a811d648..dd2bf20c 100644 --- a/app/Services/Mail/Mailgun.php +++ b/app/Services/Mail/Mailgun.php @@ -15,7 +15,7 @@ class Mailgun extends Base public function __construct() { $this->config = $this->getConfig(); - $this->mg = new MailgunService($this->config["key"]); + $this->mg = MailgunService::create($this->config["key"]); $this->domain = $this->config["domain"]; $this->sender = $this->config["sender"]; } @@ -31,14 +31,12 @@ class Mailgun extends Base public function send($to, $subject, $text, $file) { - $this->mg->sendMessage($this->domain, - [ + $this->mg->messages()->send($this->domain,[ 'from' => $this->sender, 'to' => $to, 'subject' => $subject, 'html' => $text - ], - [ + ],[ 'inline' => $file ] );