I'm trying to send mail using the following code and I'm using guzzlehttp
, but getting Fatal error: Uncaught exception 'RuntimeException'
with the message 'Puli Factory is not available'
. Please help me find a solution, thanks!
Here is my code:
require 'vendor/autoload.php';
use Mailgun\Mailgun;
# Instantiate the client.
$mgClient = new Mailgun('key-');
$domain = "domain";
# Make the call to the client.
$result = $mgClient->sendMessage("$domain",
array('from' => 'Mailgun Sandbox <xxxxxx@sandbox.mailgun.org>',
'to' => 'John Doe<xxxxx@abc.com>',
'subject' => 'Hello John Doe',
'text' => 'Email Text'));
and i've replaced key and domain with my original.