mailgun-php: Fatal error: Uncaught exception 'Mailgun\Connection\Exceptions\MissingEndpoint' with message 'The endpoint you've tried to access does not exist. Check your URL
I’m not using any frameworks plain PHP only, just trying to integrate the official package.
I’m getting the following error:
Fatal error: Uncaught exception ‘Mailgun\Connection\Exceptions\MissingEndpoint’ with message 'The endpoint you’ve tried to access does not exist. Check your URL
I had tried:
- Updating the package via Composer
- Checked the API credentials
But in vain.
I’m running it in my localhost on a Windows 7 x64 machine using XAMPP
Here is my code:
require 'vendor/autoload.php';
use Mailgun\Mailgun;
$mg = new Mailgun("key-mykey");
$mg->setApiVersion('v3');
$mg->setSslEnabled(false);
$domain = "mydomain.com";
# Now, compose and send your message.
$mg->sendMessage($domain, array('from' => 'bob@test.com',
'to' => 'test@test.com',
'subject' => 'The PHP SDK is awesome!',
'text' => 'It is so simple to send a message.'));
Please help. Thanks in advance
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19 (3 by maintainers)
Have you tried with ssl enabled?