Skip to content

MailSlurp\BounceControllerApi

All URIs are relative to https://php.api.mailslurp.com.

Method HTTP request Description
filterBouncedRecipient() POST /bounce/filter-recipients Filter a list of email recipients and remove those who have bounced
getBouncedEmail() GET /bounce/emails/{id} Get a bounced email.
getBouncedEmails() GET /bounce/emails Get paginated list of bounced emails.
getBouncedRecipient() GET /bounce/recipients/{id} Get a bounced email.
getBouncedRecipients() GET /bounce/recipients Get paginated list of bounced recipients.
getComplaints() GET /bounce/complaints Get paginated list of complaints.

filterBouncedRecipient()

filterBouncedRecipient($filter_bounced_recipients_options): MailSlurpModelsFilterBouncedRecipientsResult

Filter a list of email recipients and remove those who have bounced

Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiBounceControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$filter_bounced_recipients_options = new MailSlurpModelsFilterBouncedRecipientsOptions(); // MailSlurpModelsFilterBouncedRecipientsOptions

try {
    $result = $apiInstance->filterBouncedRecipient($filter_bounced_recipients_options);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BounceControllerApi->filterBouncedRecipient: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
filter_bounced_recipients_options MailSlurpModelsFilterBouncedRecipientsOptions

Return type

MailSlurpModelsFilterBouncedRecipientsResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: */*

[Back to top] [Back to API list] [Back to Model list] [Back to ]

getBouncedEmail()

getBouncedEmail($id): MailSlurpModelsBouncedEmailDto

Get a bounced email.

Bounced emails are email you have sent that were rejected by a recipient

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiBounceControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$id = 'id_example'; // string | ID of the bounced email to fetch

try {
    $result = $apiInstance->getBouncedEmail($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BounceControllerApi->getBouncedEmail: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string ID of the bounced email to fetch

Return type

MailSlurpModelsBouncedEmailDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: */*

[Back to top] [Back to API list] [Back to Model list] [Back to ]

getBouncedEmails()

getBouncedEmails($page, $size, $sort, $since, $before): MailSlurpModelsPageBouncedEmail

Get paginated list of bounced emails.

Bounced emails are email you have sent that were rejected by a recipient

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiBounceControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$page = 0; // int | Optional page 
$size = 20; // int | Optional page size
$sort = 'ASC'; // string | Optional createdAt sort direction ASC or DESC
$since = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at after the given timestamp
$before = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at before the given timestamp

try {
    $result = $apiInstance->getBouncedEmails($page, $size, $sort, $since, $before);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BounceControllerApi->getBouncedEmails: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
page int Optional page [optional] [default to 0]
size int Optional page size [optional] [default to 20]
sort string Optional createdAt sort direction ASC or DESC [optional] [default to 'ASC']
since DateTime Filter by created at after the given timestamp [optional]
before DateTime Filter by created at before the given timestamp [optional]

Return type

MailSlurpModelsPageBouncedEmail

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: */*

[Back to top] [Back to API list] [Back to Model list] [Back to ]

getBouncedRecipient()

getBouncedRecipient($id): MailSlurpModelsBouncedRecipientDto

Get a bounced email.

Bounced emails are email you have sent that were rejected by a recipient

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiBounceControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$id = 'id_example'; // string | ID of the bounced recipient

try {
    $result = $apiInstance->getBouncedRecipient($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BounceControllerApi->getBouncedRecipient: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string ID of the bounced recipient

Return type

MailSlurpModelsBouncedRecipientDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: */*

[Back to top] [Back to API list] [Back to Model list] [Back to ]

getBouncedRecipients()

getBouncedRecipients($page, $size, $sort, $since, $before): MailSlurpModelsPageBouncedRecipients

Get paginated list of bounced recipients.

Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiBounceControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$page = 0; // int | Optional page 
$size = 20; // int | Optional page size
$sort = 'ASC'; // string | Optional createdAt sort direction ASC or DESC
$since = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at after the given timestamp
$before = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at before the given timestamp

try {
    $result = $apiInstance->getBouncedRecipients($page, $size, $sort, $since, $before);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BounceControllerApi->getBouncedRecipients: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
page int Optional page [optional] [default to 0]
size int Optional page size [optional] [default to 20]
sort string Optional createdAt sort direction ASC or DESC [optional] [default to 'ASC']
since DateTime Filter by created at after the given timestamp [optional]
before DateTime Filter by created at before the given timestamp [optional]

Return type

MailSlurpModelsPageBouncedRecipients

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: */*

[Back to top] [Back to API list] [Back to Model list] [Back to ]

getComplaints()

getComplaints($page, $size, $sort, $since, $before): MailSlurpModelsPageComplaint

Get paginated list of complaints.

SMTP complaints made against your account

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiBounceControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$page = 0; // int | Optional page 
$size = 20; // int | Optional page size
$sort = 'ASC'; // string | Optional createdAt sort direction ASC or DESC
$since = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at after the given timestamp
$before = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at before the given timestamp

try {
    $result = $apiInstance->getComplaints($page, $size, $sort, $since, $before);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BounceControllerApi->getComplaints: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
page int Optional page [optional] [default to 0]
size int Optional page size [optional] [default to 20]
sort string Optional createdAt sort direction ASC or DESC [optional] [default to 'ASC']
since DateTime Filter by created at after the given timestamp [optional]
before DateTime Filter by created at before the given timestamp [optional]

Return type

MailSlurpModelsPageComplaint

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: */*

[Back to top] [Back to API list] [Back to Model list] [Back to ]