# MailSlurp\SentEmailsControllerApi
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
getSentEmail | GET /sent/{id} | Get sent email receipt |
getSentEmails | GET /sent | Get all sent emails in paginated form |
# getSentEmail
\MailSlurp\Models\SentEmailDto getSentEmail($id)
Get sent email receipt
# Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurp\Api\SentEmailsControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | id
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 | id |
# Return type
\MailSlurp\Models\SentEmailDto
# Authorization
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# getSentEmails
\MailSlurp\Models\PageSentEmailProjection getSentEmails($inbox_id, $page, $size, $sort)
Get all sent emails in paginated form
# Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurp\Api\SentEmailsControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$inbox_id = 'inbox_id_example'; // string | Optional inboxId to filter sender of sent emails by
$page = 0; // int | Optional page index 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
try {
$result = $apiInstance->getSentEmails($inbox_id, $page, $size, $sort);
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 index 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'] |
# Return type
\MailSlurp\Models\PageSentEmailProjection
# Authorization
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]