public class SesClient extends SesClientSupport
All of the API method of SES is includes in this class.
DEFAULT_EMAIL_PATTERN, logger, SES_HANDLERSconfig, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX| Constructor and Description |
|---|
SesClient()
Constructs a new
SesClient instance with default settings. |
SesClient(SesClientConfiguration config)
Constructs a new
SesClient instance with the specified configuration. |
assertListNotNullOrEmpty, assertStringArrayNotNullOrEmpty, assertStringNotNullOrEmpty, checkIsEmail, checkIsInteger, createRequest, fillRequestPayload, getBASE64EncoderStrFromInputStreamcomputeBktVirEndpoint, computeServiceId, getBktVirEndpoint, getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdownpublic SesClient()
SesClient instance with default settings.public SesClient(SesClientConfiguration config)
SesClient instance with the specified configuration.config - the specified configuration, default inherit super class
com.baidubce.BceClientConfigurationpublic void verifyEmail(String emailAddress)
public void verifyEmail(VerifyEmailRequest request)
request - The request object includes the URL address to verify, refer to
com.baidubce.services.ses.model.VerifyEmailRequestVerifyEmailRequestpublic ListVerifiedEmailResponse listVerifiedEmail()
public ListVerifiedEmailResponse listVerifiedEmail(SesRequest request)
request - The request object which it's credentials can be overridecom.baidubce.services.ses.model.ListVerifiedEmailResponseListVerifiedEmailResponsepublic GetVerifiedEmailResponse getVerifiedEmail(String emailAddress)
public GetVerifiedEmailResponse getVerifiedEmail(GetVerifiedEmailRequest request)
request - The request object includes email address to getcom.baidubce.services.ses.model.GetVerifiedEmailResponseGetVerifiedEmailRequest,
GetVerifiedEmailResponsepublic void deleteVerifiedEmail(String emailAddress)
public void deleteVerifiedEmail(DeleteVerifiedEmailRequest request)
request - The request object includes the email address to delete, refer to
com.baidubce.services.ses.model.DeleteVerifiedEmailRequestDeleteVerifiedEmailRequestpublic VerifyDomainResponse verifyDomain(String domainName)
public VerifyDomainResponse verifyDomain(VerifyDomainRequest request)
When this API is called successfully, it will return a token which is used to verify domain. You should put the token into DSN setting as a TXT record, then SES can finish verifying automatically.
request - The request object which includes the domain to verifyVerifyDomainRequestpublic VerifyDKIMResponse verifyDKIM(String domainName)
public VerifyDKIMResponse verifyDKIM(VerifyDKIMRequest request)
When this API is called successfully, it will return a group of tokens,you should use this tokens to create DSN CNAME records, then SES can finish verifying automatically.
request - The request object which includes the DKIM to verifyVerifyDKIMRequest,
VerifyDKIMResponsepublic void disableDKIM(String domainName)
public void disableDKIM(EnableDKIMRequest request)
Disable or enable DKIM the specifical email or domain, if enabled then SES will add DKIM for all the email about the email and domain.
request - The request object which includes domain to disableEnableDKIMRequestpublic void enableDKIM(String domainName)
public void enableDKIM(EnableDKIMRequest request)
Disable or enable DKIM the specifical email or domain, if enabled then SES will add DKIM for all the email about the email and domain.
request - The request object which includes domain to enablepublic ListVerifiedDomainResponse listVerifiedDomain()
public ListVerifiedDomainResponse listVerifiedDomain(SesRequest request)
request - The request object which it's credentials can be overrideListVerifiedDomainResponsepublic GetVerifiedDomainResponse getVerifiedDomain(String domainName)
public GetVerifiedDomainResponse getVerifiedDomain(GetVerifiedDomainRequest request)
request - The request object which includes the domain to getGetVerifiedDomainResponsepublic void deleteVerifiedDomain(String domainName)
public void deleteVerifiedDomain(DeleteVerifiedDomainRequest request)
request - The request object which includes the domain to deleteDeleteVerifiedDomainRequestpublic SendEmailResponse sendEmail(String from, String[] toAddr, String subject, String body, File... attachmentFiles)
Simple to send email without display name, all optional parameters use system default value.
from - The sender, which is requiredtoAddr - The receive, which is requiredsubject - The title of the email, which is requiredbody - The content of the email, which is requiredattachmentFiles - The array of attachment file. If you need send attachment then set it, it's optional
parameterssendEmail(com.baidubce.services.ses.model.SendEmailRequest request)public SendEmailResponse sendEmail(String from, String displayName, String[] toAddr, String subject, String body, File... attachmentFiles)
Simple to send email, all optional parameters use system default value.
from - The sender, which is requireddisplayName - The display name of sender, which can be custom by the users themselvestoAddr - The receive, which is requiredsubject - The title of the email, which is requiredbody - The content of the email, which is requiredattachmentFiles - The array of attachment file. If you need send attachment then set it, it's optional
parameterssendEmail(com.baidubce.services.ses.model.SendEmailRequest request)public SendEmailResponse sendEmail(String from, String displayName, String[] toAddr, String[] ccAddr, String[] bccAddr, String subject, String body, File... attachmentFiles)
Simple to send email, partly optional parameters use system default value.
from - The sender, which is requireddisplayName - The display name of sender, which can be custom by the users themselvestoAddr - The receive, which is requiredccAddr - The CC, which is optionalbccAddr - The BCC which is optionalsubject - The title of the email, which is requiredbody - The content of the email, which is requiredattachmentFiles - The array of attachment file. If you need send attachment then set it, it's optional
parameterssendEmail(com.baidubce.services.ses.model.SendEmailRequest request)public SendEmailResponse sendEmail(String from, String displayName, String returnPath, String replyTo, String[] toAddr, String[] ccAddr, String[] bccAddr, String subject, String body, int priority, int charset, File... attachmentFiles)
Full to send email, all optional parameters need you set.
from - The sender, which is requireddisplayName - The display name of sender, which can be custom by the users themselvesreturnPath - Optional parametersreplyTo - Optional parameterstoAddr - The receive, which is requiredccAddr - The CC, which is optionalbccAddr - The BCC which is optionalsubject - The title of the email, which is requiredbody - The content of the email, which is requiredpriority - The priority of the email, which is Optionalcharset - The charset of the email, which is OptionalattachmentFiles - The array of attachment file. If you need send attachment then set it, it's optional
parameterssendEmail(com.baidubce.services.ses.model.SendEmailRequest request)public SendEmailResponse sendEmail(SendEmailRequest request)
This method allow you to construct request object by yourself.
request - The request object which includes the parameters of sending mail, you can see detail from class
com.baidubce.services.ses.model.SendEmailRequestSendEmailRequestpublic void setFeedback(SetFeedbackRequest request)
request - The request object which includes the feedback information to setSetFeedbackRequestpublic GetFeedbackResponse getFeedback()
public GetFeedbackResponse getFeedback(SesRequest request)
request - The request object which it's credentials can be overrideGetFeedbackResponsepublic GetQuotaResponse getQuota()
public GetQuotaResponse getQuota(SesRequest request)
request - The request object which it's credentials can be overrideGetQuotaResponsepublic void setQuota(SetQuotaRequest request)
request - The request object which includes the information of quota to setSetQuotaRequestpublic ListRecipientBlacklistResponse listRecipientBlacklist()
public ListRecipientBlacklistResponse listRecipientBlacklist(SesRequest request)
request - The request object which it's credentials can be overrideListRecipientBlacklistResponsepublic IsInRecipientBlacklistResponse isInRecipientBlacklist(String emailAddress)
public IsInRecipientBlacklistResponse isInRecipientBlacklist(IsInRecipientBlacklistRequest request)
request - The request object which includes the special receiverIsInRecipientBlacklistResponsepublic GetFailedReasonResponse getFailedReason()
public GetFailedReasonResponse getFailedReason(SesRequest request)
request - The request object which it's credentials can be overrideGetFailedReasonResponseCopyright © 2023. All rights reserved.