mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-26 06:46:08 +03:00
.. | ||
Bounces.php | ||
README.md |
Mailgun - Bounces
This is the Mailgun PHP Bounces endpoint.
The below assumes you've already installed the Mailgun PHP SDK in to your project. If not, go back to the master README for instructions.
Usage
Here's how to use the "Bounces" API endpoint:
# First, instantiate the client with your PUBLIC API credentials and domain.
$mgClient = new MailgunClient("key-3ax6xnjp29jd6fds4gc373sgvjxteol0", "samples.mailgun.org");
# Next, instantiate a Bounces object on the Bounces API endpoint.
$bounces = $mgClient->Bounces();
# Finally, add an address to the Bounces Table.
$result = $bounces->addAddress("bounce@samples.mailgun.org", 550, "Server not accepting messages for mailbox.");
Available Functions
addAddress(string $bounceAddress, int $bounceCode, string $bounceError);
deleteAddress(string $bounceAddress);
getBounce(string $bounceAddress);
getBounces(int $limit, int $skip);
More Documentation
See the official Mailgun Docs for more information.