Class EmailClient

java.lang.Object
com.azure.communication.email.EmailClient

public final class EmailClient extends Object
Initializes a new instance of the synchronous EmailClient type.
  • Method Details

    • beginSend

      public com.azure.core.util.polling.SyncPoller<EmailSendResult,EmailSendResult> beginSend(EmailMessage message)
      Queues an email message to be sent to one or more recipients.
      Parameters:
      message - Message payload for sending an email.
      Returns:
      the SyncPoller for polling of status of the long running operation.
      Throws:
      com.azure.communication.email.implementation.models.ErrorResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • beginSend

      public com.azure.core.util.polling.SyncPoller<EmailSendResult,EmailSendResult> beginSend(EmailMessage message, com.azure.core.util.Context context)
      Queues an email message to be sent to one or more recipients.
      Parameters:
      message - Message payload for sending an email.
      context - The context to associate with this operation.
      Returns:
      the SyncPoller for polling of status of the long running operation.
      Throws:
      com.azure.communication.email.implementation.models.ErrorResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.