Answer the question
In order to leave comments, you need to log in
How to get stats in Mailgun?
set up the mailgun API, letters are sent, everything is fine.
I can not set up getting statistics in any way.
I write this code:
<?
ini_set("display_errors","1");
ini_set("display_startup_errors","1");
ini_set('error_reporting', E_ALL);
# Include the Autoloader (see "Libraries" for install instructions)
# Install Composer
require 'vendor/autoload.php';
use Mailgun\Mailgun;
# Instantiate the client.
$client = new \Http\Adapter\Guzzle6\Client();
$mg = new \Mailgun\Mailgun('key-XXXXXXXX, $client);
$domain = 'my-domain.ru';
$result = $mg->get("$domain/stats/total",
'duration' => '1m'
));
?>
In response, there are no errors, a blank page - Blank page
Technical support says that the code is correct, why nothing is displayed - not in their competence.
But, one thing I can point out, is that the response captured in $result is not being printed out or passed into an HTML page to render on your browser.
and sent me googling about echo and print. I tried this way and that to display this result. So far it's useless.
Tell me how to see the result.
The letters were definitely sent and delivered within the last month
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question