public function MailgunFactory::create in Mailgun 8
Create Mailgun client.
Return value
\Mailgun\Mailgun Mailgun PHP SDK Client.
File
- src/
MailgunFactory.php, line 36
Class
- MailgunFactory
- Defines the mailgun factory.
Namespace
Drupal\mailgunCode
public function create() {
if ($endpoint = $this->mailgunConfig
->get('api_endpoint')) {
return Mailgun::create($this->mailgunConfig
->get('api_key'), $endpoint);
}
else {
return Mailgun::create($this->mailgunConfig
->get('api_key'));
}
}