Class EmailServerApi

java.lang.Object
com.okta.sdk.resource.api.EmailServerApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-03-13T17:36:05.533634+05:30[Asia/Kolkata]", comments="Generator version: 7.15.0") public class EmailServerApi extends Object
  • Constructor Details

    • EmailServerApi

      public EmailServerApi()
    • EmailServerApi

      public EmailServerApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • createEmailServer

      public EmailServerResponse createEmailServer(EmailServerPost emailServerPost) throws ApiException
      Create a custom SMTP server Creates a custom email SMTP server configuration for your org
      Parameters:
      emailServerPost - (optional)
      Returns:
      EmailServerResponse
      Throws:
      ApiException - if fails to make API call
    • createEmailServer

      public EmailServerResponse createEmailServer(EmailServerPost emailServerPost, Map<String,String> additionalHeaders) throws ApiException
      Create a custom SMTP server Creates a custom email SMTP server configuration for your org
      Parameters:
      emailServerPost - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EmailServerResponse
      Throws:
      ApiException - if fails to make API call
    • deleteEmailServer

      public void deleteEmailServer(String emailServerId) throws ApiException
      Delete an SMTP server configuration Deletes the specified custom SMTP server configuration
      Parameters:
      emailServerId - (required)
      Throws:
      ApiException - if fails to make API call
    • deleteEmailServer

      public void deleteEmailServer(String emailServerId, Map<String,String> additionalHeaders) throws ApiException
      Delete an SMTP server configuration Deletes the specified custom SMTP server configuration
      Parameters:
      emailServerId - (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getEmailServer

      public EmailServerResponse getEmailServer(String emailServerId) throws ApiException
      Retrieve an SMTP server configuration Retrieves the specified custom SMTP server configuration
      Parameters:
      emailServerId - (required)
      Returns:
      EmailServerResponse
      Throws:
      ApiException - if fails to make API call
    • getEmailServer

      public EmailServerResponse getEmailServer(String emailServerId, Map<String,String> additionalHeaders) throws ApiException
      Retrieve an SMTP server configuration Retrieves the specified custom SMTP server configuration
      Parameters:
      emailServerId - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EmailServerResponse
      Throws:
      ApiException - if fails to make API call
    • listEmailServers

      public List<EmailServerResponse> listEmailServers() throws ApiException
      List all enrolled SMTP servers Lists all the enrolled custom SMTP server configurations
      Returns:
      List<EmailServerResponse>
      Throws:
      ApiException - if fails to make API call
    • listEmailServers

      public List<EmailServerResponse> listEmailServers(Map<String,String> additionalHeaders) throws ApiException
      List all enrolled SMTP servers Lists all the enrolled custom SMTP server configurations
      Parameters:
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<EmailServerResponse>
      Throws:
      ApiException - if fails to make API call
    • listEmailServersPaged

      public Iterable<EmailServerResponse> listEmailServersPaged()
      List all enrolled SMTP servers (Paginated) Lists all the enrolled custom SMTP server configurations This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks. Use this method in a for-each loop to automatically fetch all pages without manual cursor management.
      Returns:
      Iterable<EmailServerResponse> lazy iterable over all pages
    • listEmailServersPaged

      public Iterable<EmailServerResponse> listEmailServersPaged(Map<String,String> additionalHeaders)
      List all enrolled SMTP servers (Paginated with additional headers) Lists all the enrolled custom SMTP server configurations This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks.
      Parameters:
      additionalHeaders - additional headers for this call
      Returns:
      Iterable<EmailServerResponse> lazy iterable over all pages
    • testEmailServer

      public void testEmailServer(String emailServerId, EmailTestAddresses emailTestAddresses) throws ApiException
      Test an SMTP server configuration Tests the specified custom SMTP Server configuration
      Parameters:
      emailServerId - (required)
      emailTestAddresses - (optional)
      Throws:
      ApiException - if fails to make API call
    • testEmailServer

      public void testEmailServer(String emailServerId, EmailTestAddresses emailTestAddresses, Map<String,String> additionalHeaders) throws ApiException
      Test an SMTP server configuration Tests the specified custom SMTP Server configuration
      Parameters:
      emailServerId - (required)
      emailTestAddresses - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • updateEmailServer

      public EmailServerResponse updateEmailServer(String emailServerId, EmailServerRequest emailServerRequest) throws ApiException
      Update an SMTP server configuration Updates the specified custom SMTP server configuration
      Parameters:
      emailServerId - (required)
      emailServerRequest - (optional)
      Returns:
      EmailServerResponse
      Throws:
      ApiException - if fails to make API call
    • updateEmailServer

      public EmailServerResponse updateEmailServer(String emailServerId, EmailServerRequest emailServerRequest, Map<String,String> additionalHeaders) throws ApiException
      Update an SMTP server configuration Updates the specified custom SMTP server configuration
      Parameters:
      emailServerId - (required)
      emailServerRequest - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EmailServerResponse
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

      protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()