mailslurp.Api.SentEmailsControllerApi
All URIs are relative to https://csharp.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. |
GetSentDeliveryStatus | GET /sent/delivery-status/{deliveryId} | |
GetSentDeliveryStatuses | GET /sent/delivery-status | |
GetSentDeliveryStatusesBySentId | GET /sent/{sentId}/delivery-status | |
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 |
GetSentEmailsWithQueueResults | GET /sent/queue-results | Get results of email sent with queues in paginated form |
GetSentOrganizationEmails | GET /sent/organization | |
WaitForDeliveryStatuses | GET /sent/delivery-status/wait-for |
void DeleteAllSentEmails ()
Delete all sent email receipts
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class DeleteAllSentEmailsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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);
try
{
// Delete all sent email receipts
apiInstance.DeleteAllSentEmails();
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.DeleteAllSentEmails: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the DeleteAllSentEmailsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Delete all sent email receipts
apiInstance.DeleteAllSentEmailsWithHttpInfo();
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.DeleteAllSentEmailsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
This endpoint does not need any parameter.
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
void DeleteSentEmail (Guid id)
Delete sent email receipt
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class DeleteSentEmailExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "id_example"; // Guid |
try
{
// Delete sent email receipt
apiInstance.DeleteSentEmail(id);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.DeleteSentEmail: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the DeleteSentEmailWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Delete sent email receipt
apiInstance.DeleteSentEmailWithHttpInfo(id);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.DeleteSentEmailWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | Guid |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageTrackingPixelProjection GetAllSentTrackingPixels (int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null)
Get all sent email tracking pixels in paginated form
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetAllSentTrackingPixelsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 page = 0; // int? | Optional page in sent email tracking pixel list pagination (optional) (default to 0)
var size = 20; // int? | Optional page size in sent email tracking pixel list pagination (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
var searchFilter = "searchFilter_example"; // string | Optional search filter (optional)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional)
try
{
PageTrackingPixelProjection result = apiInstance.GetAllSentTrackingPixels(page, size, sort, searchFilter, since, before);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetAllSentTrackingPixels: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetAllSentTrackingPixelsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<PageTrackingPixelProjection> response = apiInstance.GetAllSentTrackingPixelsWithHttpInfo(page, size, sort, searchFilter, since, before);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetAllSentTrackingPixelsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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] |
searchFilter | 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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
string GetRawSentEmailContents (Guid emailId)
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
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetRawSentEmailContentsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 emailId = "emailId_example"; // Guid | ID of email
try
{
// Get raw sent email string. Returns unparsed raw SMTP message with headers and body.
string result = apiInstance.GetRawSentEmailContents(emailId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetRawSentEmailContents: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetRawSentEmailContentsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get raw sent email string. Returns unparsed raw SMTP message with headers and body.
ApiResponse<string> response = apiInstance.GetRawSentEmailContentsWithHttpInfo(emailId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetRawSentEmailContentsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
emailId | Guid | ID of email |
Return type
string
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: text/plain
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
RawEmailJson GetRawSentEmailJson (Guid emailId)
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
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetRawSentEmailJsonExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 emailId = "emailId_example"; // Guid | ID of email
try
{
// Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.
RawEmailJson result = apiInstance.GetRawSentEmailJson(emailId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetRawSentEmailJson: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetRawSentEmailJsonWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.
ApiResponse<RawEmailJson> response = apiInstance.GetRawSentEmailJsonWithHttpInfo(emailId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetRawSentEmailJsonWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
emailId | Guid | ID of email |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
DeliveryStatusDto GetSentDeliveryStatus (Guid deliveryId)
Get a sent email delivery status
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetSentDeliveryStatusExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 deliveryId = "deliveryId_example"; // Guid |
try
{
DeliveryStatusDto result = apiInstance.GetSentDeliveryStatus(deliveryId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentDeliveryStatus: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetSentDeliveryStatusWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<DeliveryStatusDto> response = apiInstance.GetSentDeliveryStatusWithHttpInfo(deliveryId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentDeliveryStatusWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
deliveryId | Guid |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageDeliveryStatus GetSentDeliveryStatuses (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null)
Get all sent email delivery statuses
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetSentDeliveryStatusesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 page = 0; // int? | Optional page in delivery status list pagination (optional) (default to 0)
var size = 20; // int? | Optional page size in delivery status list pagination (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional)
try
{
PageDeliveryStatus result = apiInstance.GetSentDeliveryStatuses(page, size, sort, since, before);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentDeliveryStatuses: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetSentDeliveryStatusesWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<PageDeliveryStatus> response = apiInstance.GetSentDeliveryStatusesWithHttpInfo(page, size, sort, since, before);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentDeliveryStatusesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
page | int? | Optional page in delivery status list pagination | [optional] [default to 0] |
size | int? | Optional page size in delivery status list pagination | [optional] [default to 20] |
sort | string | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] |
since | DateTime? | Filter by created at after the given timestamp | [optional] |
before | DateTime? | Filter by created at before the given timestamp | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageDeliveryStatus GetSentDeliveryStatusesBySentId (Guid sentId, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null)
Get all sent email delivery statuses
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetSentDeliveryStatusesBySentIdExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 sentId = "sentId_example"; // Guid |
var page = 0; // int? | Optional page in delivery status list pagination (optional) (default to 0)
var size = 20; // int? | Optional page size in delivery status list pagination (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional)
try
{
PageDeliveryStatus result = apiInstance.GetSentDeliveryStatusesBySentId(sentId, page, size, sort, since, before);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentDeliveryStatusesBySentId: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetSentDeliveryStatusesBySentIdWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<PageDeliveryStatus> response = apiInstance.GetSentDeliveryStatusesBySentIdWithHttpInfo(sentId, page, size, sort, since, before);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentDeliveryStatusesBySentIdWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
sentId | Guid | ||
page | int? | Optional page in delivery status list pagination | [optional] [default to 0] |
size | int? | Optional page size in delivery status list pagination | [optional] [default to 20] |
sort | string | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] |
since | DateTime? | Filter by created at after the given timestamp | [optional] |
before | DateTime? | Filter by created at before the given timestamp | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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://csharp.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 = "id_example"; // Guid |
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);
}
}
}
}
Using the GetSentEmailWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get sent email receipt
ApiResponse<SentEmailDto> response = apiInstance.GetSentEmailWithHttpInfo(id);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | Guid |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
string GetSentEmailHTMLContent (Guid id)
Get sent email HTML content
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetSentEmailHTMLContentExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "id_example"; // Guid |
try
{
// Get sent email HTML content
string result = apiInstance.GetSentEmailHTMLContent(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailHTMLContent: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetSentEmailHTMLContentWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get sent email HTML content
ApiResponse<string> response = apiInstance.GetSentEmailHTMLContentWithHttpInfo(id);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailHTMLContentWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | Guid |
Return type
string
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: text/html
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
EmailPreviewUrls GetSentEmailPreviewURLs (Guid 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
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetSentEmailPreviewURLsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "id_example"; // Guid |
try
{
// Get sent email URL for viewing in browser or downloading
EmailPreviewUrls result = apiInstance.GetSentEmailPreviewURLs(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailPreviewURLs: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetSentEmailPreviewURLsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get sent email URL for viewing in browser or downloading
ApiResponse<EmailPreviewUrls> response = apiInstance.GetSentEmailPreviewURLsWithHttpInfo(id);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailPreviewURLsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | Guid |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageTrackingPixelProjection GetSentEmailTrackingPixels (Guid id, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null)
Get all tracking pixels for a sent email in paginated form
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetSentEmailTrackingPixelsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "id_example"; // Guid |
var page = 0; // int? | Optional page in sent email tracking pixel list pagination (optional) (default to 0)
var size = 20; // int? | Optional page size in sent email tracking pixel list pagination (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
var searchFilter = "searchFilter_example"; // string | Optional search filter (optional)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional)
try
{
PageTrackingPixelProjection result = apiInstance.GetSentEmailTrackingPixels(id, page, size, sort, searchFilter, since, before);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailTrackingPixels: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetSentEmailTrackingPixelsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<PageTrackingPixelProjection> response = apiInstance.GetSentEmailTrackingPixelsWithHttpInfo(id, page, size, sort, searchFilter, since, before);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailTrackingPixelsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | Guid | ||
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] |
searchFilter | 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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageSentEmailProjection GetSentEmails (Guid? inboxId = null, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = 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://csharp.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 = "inboxId_example"; // Guid? | Optional inboxId to filter sender of sent emails by (optional)
var page = 0; // int? | Optional page in inbox sent email list pagination (optional) (default to 0)
var size = 20; // int? | Optional page size in inbox sent email list pagination (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
var searchFilter = "searchFilter_example"; // string | Optional search filter (optional)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional)
try
{
// Get all sent emails in paginated form
PageSentEmailProjection result = apiInstance.GetSentEmails(inboxId, page, size, sort, searchFilter, since, before);
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);
}
}
}
}
Using the GetSentEmailsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get all sent emails in paginated form
ApiResponse<PageSentEmailProjection> response = apiInstance.GetSentEmailsWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailsWithHttpInfo: " + 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 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] |
searchFilter | 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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageSentEmailWithQueueProjection GetSentEmailsWithQueueResults (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null)
Get results of email sent with queues in paginated form
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetSentEmailsWithQueueResultsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 page = 0; // int? | Optional page in inbox sent email list pagination (optional) (default to 0)
var size = 20; // int? | Optional page size in inbox sent email list pagination (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional)
try
{
// Get results of email sent with queues in paginated form
PageSentEmailWithQueueProjection result = apiInstance.GetSentEmailsWithQueueResults(page, size, sort, since, before);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailsWithQueueResults: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetSentEmailsWithQueueResultsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get results of email sent with queues in paginated form
ApiResponse<PageSentEmailWithQueueProjection> response = apiInstance.GetSentEmailsWithQueueResultsWithHttpInfo(page, size, sort, since, before);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailsWithQueueResultsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
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] |
since | DateTime? | Filter by created at after the given timestamp | [optional] |
before | DateTime? | Filter by created at before the given timestamp | [optional] |
Return type
PageSentEmailWithQueueProjection
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageSentEmailProjection GetSentOrganizationEmails (Guid? inboxId = null, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null)
Get all sent organization 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 GetSentOrganizationEmailsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "inboxId_example"; // Guid? | Optional inboxId to filter sender of sent emails by (optional)
var page = 0; // int? | Optional page in sent email list pagination (optional) (default to 0)
var size = 20; // int? | Optional page size in sent email list pagination (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
var searchFilter = "searchFilter_example"; // string | Optional search filter (optional)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional)
try
{
PageSentEmailProjection result = apiInstance.GetSentOrganizationEmails(inboxId, page, size, sort, searchFilter, since, before);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentOrganizationEmails: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetSentOrganizationEmailsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<PageSentEmailProjection> response = apiInstance.GetSentOrganizationEmailsWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.GetSentOrganizationEmailsWithHttpInfo: " + 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 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] |
searchFilter | 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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
DeliveryStatusDto WaitForDeliveryStatuses (Guid? sentId = null, Guid? inboxId = null, long? timeout = null, int? = null, DateTime? since = null, DateTime? before = null)
Wait for delivery statuses
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class WaitForDeliveryStatusesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 sentId = "sentId_example"; // Guid? | Optional sent email ID filter (optional)
var inboxId = "inboxId_example"; // Guid? | Optional inbox ID filter (optional)
var timeout = 789L; // long? | Optional timeout milliseconds (optional)
var = 56; // int? | Zero based of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass =1 (optional)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional)
try
{
DeliveryStatusDto result = apiInstance.WaitForDeliveryStatuses(sentId, inboxId, timeout, , since, before);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.WaitForDeliveryStatuses: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the WaitForDeliveryStatusesWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<DeliveryStatusDto> response = apiInstance.WaitForDeliveryStatusesWithHttpInfo(sentId, inboxId, timeout, , since, before);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SentEmailsControllerApi.WaitForDeliveryStatusesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
sentId | Guid? | Optional sent email ID filter | [optional] |
inboxId | Guid? | Optional inbox ID filter | [optional] |
timeout | long? | Optional timeout milliseconds | [optional] |
**** | int? | Zero based of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass =1 | [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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]