Skip to content

MailSlurp\SentEmailsControllerApi

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

Method HTTP request Description
deleteAllSentEmails DELETE /sent Delete all sent email receipts
deleteSentEmail DELETE /sent/{id} Delete sent email receipt
getAllSentTrackingPixels GET /sent/tracking-pixels
getRawSentEmailContents GET /sent/{emailId}/raw Get raw sent email string. Returns unparsed raw SMTP message with headers and body.
getRawSentEmailJson GET /sent/{emailId}/raw/json Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.
getSentEmail GET /sent/{id} Get sent email receipt
getSentEmailHTMLContent GET /sent/{id}/html Get sent email HTML content
getSentEmailPreviewURLs GET /sent/{id}/urls Get sent email URL for viewing in browser or downloading
getSentEmailTrackingPixels GET /sent/{id}/tracking-pixels
getSentEmails GET /sent Get all sent emails in paginated form
getSentOrganizationEmails GET /sent/organization

deleteAllSentEmails

deleteAllSentEmails()

Delete all sent email receipts

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 MailSlurpApiSentEmailsControllerApi(
    // 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
);

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

Parameters

This endpoint does not need any parameter.

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 ]

deleteSentEmail

deleteSentEmail($id)

Delete sent email receipt

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 MailSlurpApiSentEmailsControllerApi(
    // 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 | 

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

Parameters

Name Type Description Notes
id string

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 ]

getAllSentTrackingPixels

MailSlurpModelsPageTrackingPixelProjection getAllSentTrackingPixels($page, $size, $sort, $search_filter, $since, $before)

Get all sent email tracking pixels in paginated form

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 MailSlurpApiSentEmailsControllerApi(
    // 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  in sent email tracking pixel list pagination
$size = 20; // int | Optional page size in sent email tracking pixel 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->getAllSentTrackingPixels($page, $size, $sort, $search_filter, $since, $before);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SentEmailsControllerApi->getAllSentTrackingPixels: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
page int Optional page in sent email tracking pixel list pagination [optional] [default to 0]
size int Optional page size in sent email tracking pixel 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

MailSlurpModelsPageTrackingPixelProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

getRawSentEmailContents

string getRawSentEmailContents($email_id)

Get raw sent email string. Returns unparsed raw SMTP message with headers and body.

Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint

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 MailSlurpApiSentEmailsControllerApi(
    // 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
);
$email_id = 'email_id_example'; // string | ID of email

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

Parameters

Name Type Description Notes
email_id string ID of email

Return type

string

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

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

getRawSentEmailJson

MailSlurpModelsRawEmailJson getRawSentEmailJson($email_id)

Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.

Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response

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 MailSlurpApiSentEmailsControllerApi(
    // 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
);
$email_id = 'email_id_example'; // string | ID of email

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

Parameters

Name Type Description Notes
email_id string ID of email

Return type

MailSlurpModelsRawEmailJson

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

getSentEmail

MailSlurpModelsSentEmailDto getSentEmail($id)

Get sent email receipt

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 MailSlurpApiSentEmailsControllerApi(
    // 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 | 

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

Parameters

Name Type Description Notes
id string

Return type

MailSlurpModelsSentEmailDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

getSentEmailHTMLContent

string getSentEmailHTMLContent($id)

Get sent email HTML content

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 MailSlurpApiSentEmailsControllerApi(
    // 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 | 

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

Parameters

Name Type Description Notes
id string

Return type

string

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/html

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

getSentEmailPreviewURLs

MailSlurpModelsEmailPreviewUrls getSentEmailPreviewURLs($id)

Get sent email URL for viewing in browser or downloading

Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser.

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 MailSlurpApiSentEmailsControllerApi(
    // 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 | 

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

Parameters

Name Type Description Notes
id string

Return type

MailSlurpModelsEmailPreviewUrls

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

getSentEmailTrackingPixels

MailSlurpModelsPageTrackingPixelProjection getSentEmailTrackingPixels($id, $page, $size, $sort, $search_filter, $since, $before)

Get all tracking pixels for a sent email in paginated form

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 MailSlurpApiSentEmailsControllerApi(
    // 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 | 
$page = 0; // int | Optional page  in sent email tracking pixel list pagination
$size = 20; // int | Optional page size in sent email tracking pixel 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->getSentEmailTrackingPixels($id, $page, $size, $sort, $search_filter, $since, $before);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SentEmailsControllerApi->getSentEmailTrackingPixels: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id string
page int Optional page in sent email tracking pixel list pagination [optional] [default to 0]
size int Optional page size in sent email tracking pixel 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

MailSlurpModelsPageTrackingPixelProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

getSentEmails

MailSlurpModelsPageSentEmailProjection getSentEmails($inbox_id, $page, $size, $sort, $search_filter, $since, $before)

Get all sent emails in paginated form

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 MailSlurpApiSentEmailsControllerApi(
    // 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 inboxId to filter sender of sent emails by
$page = 0; // int | Optional page  in inbox sent email list pagination
$size = 20; // int | Optional page size in inbox sent email 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->getSentEmails($inbox_id, $page, $size, $sort, $search_filter, $since, $before);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SentEmailsControllerApi->getSentEmails: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
inbox_id string Optional inboxId to filter sender of sent emails by [optional]
page int Optional page in inbox sent email list pagination [optional] [default to 0]
size int Optional page size in inbox sent email 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

MailSlurpModelsPageSentEmailProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

getSentOrganizationEmails

MailSlurpModelsPageSentEmailProjection getSentOrganizationEmails($inbox_id, $page, $size, $sort, $search_filter, $since, $before)

Get all sent organization emails in paginated form

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 MailSlurpApiSentEmailsControllerApi(
    // 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 inboxId to filter sender of sent emails by
$page = 0; // int | Optional page  in sent email list pagination
$size = 20; // int | Optional page size in sent email 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->getSentOrganizationEmails($inbox_id, $page, $size, $sort, $search_filter, $since, $before);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SentEmailsControllerApi->getSentOrganizationEmails: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
inbox_id string Optional inboxId to filter sender of sent emails by [optional]
page int Optional page in sent email list pagination [optional] [default to 0]
size int Optional page size in sent email 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

MailSlurpModelsPageSentEmailProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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