Integration with the Mailgun API

Asked

Viewed 13 times

0

I’m trying to get events and emails from Mailgun users through their API. I already consulted the documentation and I can’t get this data and put it in my application. I can only get the answer from one user and I would like to get it from everyone.

   <?php
        require './vendor/autoload.php';
        use Mailgun\Mailgun;
        
        # Instantiate the client.
        $mgClient = Mailgun::create('key','https://api.mailgun.net');
        $domain = "domain";
        
        $queryString = array(
        'begin'        => 'Thu, 01 Feb 2021 15:00:00 -0000',
        'ascending'    => 'yes',
        'limit'        =>  10,
        'pretty'       => 'yes',
        'recipient'    => '[email protected]'
);

        
        # Issue the call to the client.
        $result = $mgClient->events()->get($domain, $queryString);
        
        echo '<pre>';
        print_r($result);

inserir a descrição da imagem aqui

In short, I want to bring all API events and emails to my application.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.