# 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(id)

Get sent email receipt

# Example

// Import classes:
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.auth.*;
import com.mailslurp.clients.models.*;
import com.mailslurp.apis.SentEmailsControllerApi;
public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.mailslurp.com");
    // Configure API key authorization: API_KEY
    ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
    API_KEY.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //API_KEY.setApiKeyPrefix("Token");
    SentEmailsControllerApi apiInstance = new SentEmailsControllerApi(defaultClient);
    UUID id = new UUID(); // UUID | id
    try {
      SentEmailDto result = apiInstance.getSentEmail(id);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SentEmailsControllerApi#getSentEmail");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

# Parameters

Name Type Description Notes
id UUID id

# Return type

SentEmailDto

# Authorization

API_KEY

# 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 -

# getSentEmails

PageSentEmailProjection getSentEmails(inboxId, page, size, sort)

Get all sent emails in paginated form

# Example

// Import classes:
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.auth.*;
import com.mailslurp.clients.models.*;
import com.mailslurp.apis.SentEmailsControllerApi;
public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.mailslurp.com");
    // Configure API key authorization: API_KEY
    ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
    API_KEY.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //API_KEY.setApiKeyPrefix("Token");
    SentEmailsControllerApi apiInstance = new SentEmailsControllerApi(defaultClient);
    UUID inboxId = new UUID(); // UUID | Optional inboxId to filter sender of sent emails by
    Integer page = 0; // Integer | Optional page index in inbox sent email list pagination
    Integer size = 20; // Integer | Optional page size in inbox sent email list pagination
    String sort = "ASC"; // String | Optional createdAt sort direction ASC or DESC
    try {
      PageSentEmailProjection result = apiInstance.getSentEmails(inboxId, page, size, sort);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SentEmailsControllerApi#getSentEmails");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

# Parameters

Name Type Description Notes
inboxId UUID Optional inboxId to filter sender of sent emails by [optional]
page Integer Optional page index in inbox sent email list pagination [optional] [default to 0]
size Integer 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] [enum: ASC, DESC]

# Return type

PageSentEmailProjection

# Authorization

API_KEY

# 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 -