mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-22 04:26:02 +03:00
Include API endpoint in README (#557)
This commit is contained in:
parent
c51c6b10a0
commit
398989de61
@ -52,11 +52,12 @@ use Mailgun\Mailgun;
|
|||||||
Here's how to send a message using the SDK:
|
Here's how to send a message using the SDK:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
# First, instantiate the SDK with your API credentials
|
// First, instantiate the SDK with your API credentials
|
||||||
$mg = Mailgun::create('key-example');
|
$mg = Mailgun::create('key-example'); // For US servers
|
||||||
|
$mg = Mailgun::create('key-example', 'https://api.eu.mailgun.net'); // For EU servers
|
||||||
|
|
||||||
# Now, compose and send your message.
|
// Now, compose and send your message.
|
||||||
# $mg->messages()->send($domain, $params);
|
// $mg->messages()->send($domain, $params);
|
||||||
$mg->messages()->send('example.com', [
|
$mg->messages()->send('example.com', [
|
||||||
'from' => 'bob@example.com',
|
'from' => 'bob@example.com',
|
||||||
'to' => 'sally@example.com',
|
'to' => 'sally@example.com',
|
||||||
|
Loading…
Reference in New Issue
Block a user