Package com.azure.communication.email
Class EmailClient
java.lang.Object
com.azure.communication.email.EmailClient
Initializes a new instance of the synchronous EmailClient type.
-
Method Summary
Modifier and TypeMethodDescriptioncom.azure.core.util.polling.SyncPoller<EmailSendResult,EmailSendResult> beginSend(EmailMessage message) Queues an email message to be sent to one or more recipients.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.
-
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
SyncPollerfor 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
SyncPollerfor 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.
-