修复mailgun

master
CGDF 8 years ago
parent 7d8014907c
commit d2592ed0d0

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

Loading…
Cancel
Save