# mailslurp.Api.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
SentEmailDto GetSentEmail (Guid id)
Get sent email receipt
# Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetSentEmailExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.mailslurp.com";
// Configure API key authorization: API_KEY
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new SentEmailsControllerApi(config);
var id = new Guid(); // Guid | id
try
{
// Get sent email receipt
SentEmailDto result = apiInstance.GetSentEmail(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmail: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | Guid | id |
# Return type
# Authorization
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
# HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# GetSentEmails
PageSentEmailProjection GetSentEmails (Guid? inboxId = null, int? page = null, int? size = null, string sort = null)
Get all sent emails in paginated form
# Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetSentEmailsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.mailslurp.com";
// Configure API key authorization: API_KEY
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new SentEmailsControllerApi(config);
var inboxId = new Guid?(); // Guid? | Optional inboxId to filter sender of sent emails by (optional)
var page = 56; // int? | Optional page index in inbox sent email list pagination (optional) (default to 0)
var size = 56; // int? | Optional page size in inbox sent email list pagination (optional) (default to 20)
var sort = sort_example; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
try
{
// Get all sent emails in paginated form
PageSentEmailProjection result = apiInstance.GetSentEmails(inboxId, page, size, sort);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmails: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | Guid? | 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
# Authorization
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
# HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]