mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-12-01 17:36:05 +03:00
Provide a working debugging example in README
This commit is contained in:
parent
cd08d99f87
commit
38077747b2
@ -124,10 +124,15 @@ Go to http://bin.mailgun.net. The Postbin will generate a special URL. Save that
|
||||
For example, the bin id in this URL (http://bin.mailgun.net/aecf68de) is `aecf68de`.*
|
||||
|
||||
```php
|
||||
use Mailgun\HttpClient\HttpClientConfigurator;
|
||||
use Mailgun\Hydrator\NoopHydrator;
|
||||
|
||||
$configurator = new HttpClientConfigurator();
|
||||
$configurator->setEndpoint('http://bin.mailgun.net/aecf68de');
|
||||
$configurator->setApiKey('key-example');
|
||||
$configurator->setDebug(true);
|
||||
$mg = new Mailgun($configurator);
|
||||
|
||||
$mg = new Mailgun($configurator, new NoopHydrator());
|
||||
|
||||
# Now, compose and send your message.
|
||||
$mg->messages()->send('example.com', [
|
||||
|
Loading…
Reference in New Issue
Block a user