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 ] );