MailSlurpInboxForwarderControllerApi

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

MethodHTTP requestDescription
createNewInboxForwarderPOST /forwardersCreate an inbox forwarder
deleteInboxForwarderDELETE /forwarders/{id}Delete an inbox forwarder
deleteInboxForwardersDELETE /forwardersDelete inbox forwarders
getInboxForwarderGET /forwarders/{id}Get an inbox forwarder
getInboxForwardersGET /forwardersList inbox forwarders
testInboxForwarderPOST /forwarders/{id}/testTest an inbox forwarder
testInboxForwardersForInboxPUT /forwardersTest inbox forwarders for inbox
testNewInboxForwarderPATCH /forwardersTest new inbox forwarder

createNewInboxForwarder

MailSlurpModelsInboxForwarderDto createNewInboxForwarder($create_inbox_forwarder_options, $inbox_id)

Create an inbox forwarder

Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving

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 MailSlurpApiInboxForwarderControllerApi(
    // 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
);
$create_inbox_forwarder_options = new MailSlurpModelsCreateInboxForwarderOptions(); // MailSlurpModelsCreateInboxForwarderOptions | createInboxForwarderOptions
$inbox_id = 'inbox_id_example'; // string | Inbox id to attach forwarder to

try {
    $result = $apiInstance->createNewInboxForwarder($create_inbox_forwarder_options, $inbox_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InboxForwarderControllerApi->createNewInboxForwarder: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
create_inbox_forwarder_optionsMailSlurpModelsCreateInboxForwarderOptionscreateInboxForwarderOptions
inbox_idstringInbox id to attach forwarder to[optional]

Return type

MailSlurpModelsInboxForwarderDto

Authorization

API_KEY

HTTP request headers

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

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

deleteInboxForwarder

deleteInboxForwarder($id)

Delete an inbox forwarder

Delete inbox forwarder

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 MailSlurpApiInboxForwarderControllerApi(
    // 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 inbox forwarder

try {
    $apiInstance->deleteInboxForwarder($id);
} catch (Exception $e) {
    echo 'Exception when calling InboxForwarderControllerApi->deleteInboxForwarder: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
idstringID of inbox forwarder

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

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

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

deleteInboxForwarders

deleteInboxForwarders($inbox_id)

Delete inbox forwarders

Delete inbox forwarders. Accepts optional inboxId filter.

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 MailSlurpApiInboxForwarderControllerApi(
    // 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
);
$inbox_id = 'inbox_id_example'; // string | Optional inbox id to attach forwarder to

try {
    $apiInstance->deleteInboxForwarders($inbox_id);
} catch (Exception $e) {
    echo 'Exception when calling InboxForwarderControllerApi->deleteInboxForwarders: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
inbox_idstringOptional inbox id to attach forwarder to[optional]

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

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

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

getInboxForwarder

MailSlurpModelsInboxForwarderDto getInboxForwarder($id)

Get an inbox forwarder

Get inbox ruleset

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 MailSlurpApiInboxForwarderControllerApi(
    // 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 inbox forwarder

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

Parameters

NameTypeDescriptionNotes
idstringID of inbox forwarder

Return type

MailSlurpModelsInboxForwarderDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

getInboxForwarders

MailSlurpModelsPageInboxForwarderDto getInboxForwarders($before, $inbox_id, $page, $search_filter, $since, $size, $sort)

List inbox forwarders

List all forwarders attached to an inbox

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 MailSlurpApiInboxForwarderControllerApi(
    // 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
);
$before = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at before the given timestamp
$inbox_id = 'inbox_id_example'; // string | Optional inbox id to get forwarders from
$page = 0; // int | Optional page  in inbox forwarder list pagination
$search_filter = 'search_filter_example'; // string | Optional search filter
$since = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at after the given timestamp
$size = 20; // int | Optional page size in inbox forwarder list pagination
$sort = 'ASC'; // string | Optional createdAt sort direction ASC or DESC

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

Parameters

NameTypeDescriptionNotes
beforeDateTimeFilter by created at before the given timestamp[optional]
inbox_idstringOptional inbox id to get forwarders from[optional]
pageintOptional page in inbox forwarder list pagination[optional] [default to 0]
search_filterstringOptional search filter[optional]
sinceDateTimeFilter by created at after the given timestamp[optional]
sizeintOptional page size in inbox forwarder list pagination[optional] [default to 20]
sortstringOptional createdAt sort direction ASC or DESC[optional] [default to ‘ASC’]

Return type

MailSlurpModelsPageInboxForwarderDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

testInboxForwarder

MailSlurpModelsInboxForwarderTestResult testInboxForwarder($id, $inbox_forwarder_test_options)

Test an inbox forwarder

Test an inbox forwarder

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 MailSlurpApiInboxForwarderControllerApi(
    // 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 inbox forwarder
$inbox_forwarder_test_options = new MailSlurpModelsInboxForwarderTestOptions(); // MailSlurpModelsInboxForwarderTestOptions | inboxForwarderTestOptions

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

Parameters

NameTypeDescriptionNotes
idstringID of inbox forwarder
inbox_forwarder_test_optionsMailSlurpModelsInboxForwarderTestOptionsinboxForwarderTestOptions

Return type

MailSlurpModelsInboxForwarderTestResult

Authorization

API_KEY

HTTP request headers

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

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

testInboxForwardersForInbox

MailSlurpModelsInboxForwarderTestResult testInboxForwardersForInbox($inbox_id, $inbox_forwarder_test_options)

Test inbox forwarders for inbox

Test inbox forwarders for inbox

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 MailSlurpApiInboxForwarderControllerApi(
    // 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
);
$inbox_id = 'inbox_id_example'; // string | ID of inbox
$inbox_forwarder_test_options = new MailSlurpModelsInboxForwarderTestOptions(); // MailSlurpModelsInboxForwarderTestOptions | inboxForwarderTestOptions

try {
    $result = $apiInstance->testInboxForwardersForInbox($inbox_id, $inbox_forwarder_test_options);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InboxForwarderControllerApi->testInboxForwardersForInbox: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
inbox_idstringID of inbox
inbox_forwarder_test_optionsMailSlurpModelsInboxForwarderTestOptionsinboxForwarderTestOptions

Return type

MailSlurpModelsInboxForwarderTestResult

Authorization

API_KEY

HTTP request headers

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

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

testNewInboxForwarder

MailSlurpModelsInboxForwarderTestResult testNewInboxForwarder($test_new_inbox_forwarder_options)

Test new inbox forwarder

Test new inbox forwarder

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 MailSlurpApiInboxForwarderControllerApi(
    // 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
);
$test_new_inbox_forwarder_options = new MailSlurpModelsTestNewInboxForwarderOptions(); // MailSlurpModelsTestNewInboxForwarderOptions | testNewInboxForwarderOptions

try {
    $result = $apiInstance->testNewInboxForwarder($test_new_inbox_forwarder_options);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InboxForwarderControllerApi->testNewInboxForwarder: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
test_new_inbox_forwarder_optionsMailSlurpModelsTestNewInboxForwarderOptionstestNewInboxForwarderOptions

Return type

MailSlurpModelsInboxForwarderTestResult

Authorization

API_KEY

HTTP request headers

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

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