Skip to content

MailSlurp\InboxForwarderControllerApi

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

Method HTTP request Description
createNewInboxForwarder() POST /forwarders Create an inbox forwarder
deleteInboxForwarder() DELETE /forwarders/{id} Delete an inbox forwarder
deleteInboxForwarders() DELETE /forwarders Delete inbox forwarders
getInboxForwarder() GET /forwarders/{id} Get an inbox forwarder
getInboxForwarders() GET /forwarders List inbox forwarders
testInboxForwarder() POST /forwarders/{id}/test Test an inbox forwarder
testInboxForwardersForInbox() PUT /forwarders Test inbox forwarders for inbox
testNewInboxForwarder() PATCH /forwarders Test new inbox forwarder

createNewInboxForwarder()

createNewInboxForwarder($inbox_id, $create_inbox_forwarder_options): MailSlurpModelsInboxForwarderDto

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

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

Parameters

Name Type Description Notes
inbox_id string Inbox id to attach forwarder to
create_inbox_forwarder_options MailSlurpModelsCreateInboxForwarderOptions

Return type

MailSlurpModelsInboxForwarderDto

Authorization

API_KEY

HTTP request headers

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

[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

Name Type Description Notes
id string ID 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

Name Type Description Notes
inbox_id string Optional 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()

getInboxForwarder($id): MailSlurpModelsInboxForwarderDto

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

Name Type Description Notes
id string ID of inbox forwarder

Return type

MailSlurpModelsInboxForwarderDto

Authorization

API_KEY

HTTP request headers

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

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

getInboxForwarders()

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

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

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

Parameters

Name Type Description Notes
inbox_id string Optional inbox id to get forwarders from [optional]
page int Optional page in inbox forwarder list pagination [optional] [default to 0]
size int Optional page size in inbox forwarder list pagination [optional] [default to 20]
sort string Optional createdAt sort direction ASC or DESC [optional] [default to 'ASC']
search_filter string Optional search filter [optional]
since DateTime Filter by created at after the given timestamp [optional]
before DateTime Filter by created at before the given timestamp [optional]

Return type

MailSlurpModelsPageInboxForwarderDto

Authorization

API_KEY

HTTP request headers

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

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

testInboxForwarder()

testInboxForwarder($id, $inbox_forwarder_test_options): MailSlurpModelsInboxForwarderTestResult

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

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

Name Type Description Notes
id string ID of inbox forwarder
inbox_forwarder_test_options MailSlurpModelsInboxForwarderTestOptions

Return type

MailSlurpModelsInboxForwarderTestResult

Authorization

API_KEY

HTTP request headers

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

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

testInboxForwardersForInbox()

testInboxForwardersForInbox($inbox_id, $inbox_forwarder_test_options): MailSlurpModelsInboxForwarderTestResult

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

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

Name Type Description Notes
inbox_id string ID of inbox
inbox_forwarder_test_options MailSlurpModelsInboxForwarderTestOptions

Return type

MailSlurpModelsInboxForwarderTestResult

Authorization

API_KEY

HTTP request headers

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

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

testNewInboxForwarder()

testNewInboxForwarder($test_new_inbox_forwarder_options): MailSlurpModelsInboxForwarderTestResult

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

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

Name Type Description Notes
test_new_inbox_forwarder_options MailSlurpModelsTestNewInboxForwarderOptions

Return type

MailSlurpModelsInboxForwarderTestResult

Authorization

API_KEY

HTTP request headers

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

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