类 SesClient


  • public class SesClient
    extends SesClientSupport
    The entrance class for all client access to the API of SES(Baidu email Service).

    All of the API method of SES is includes in this class.

    • 构造器详细资料

      • SesClient

        public SesClient()
        Constructs a new SesClient instance with default settings.
      • SesClient

        public SesClient​(SesClientConfiguration config)
        Constructs a new SesClient instance with the specified configuration.
        参数:
        config - the specified configuration, default inherit super class com.baidubce.BceClientConfiguration
    • 方法详细资料

      • verifyEmail

        public void verifyEmail​(String emailAddress)
      • verifyEmail

        public void verifyEmail​(VerifyEmailRequest request)
        Verify email address
        参数:
        request - The request object includes the URL address to verify, refer to com.baidubce.services.ses.model.VerifyEmailRequest
        另请参阅:
        VerifyEmailRequest
      • listVerifiedEmail

        public ListVerifiedEmailResponse listVerifiedEmail​(SesRequest request)
        Get the list of verified email address
        参数:
        request - The request object which it's credentials can be override
        返回:
        The response object includes the detail of verified email address, refer to com.baidubce.services.ses.model.ListVerifiedEmailResponse
        另请参阅:
        ListVerifiedEmailResponse
      • deleteVerifiedEmail

        public void deleteVerifiedEmail​(String emailAddress)
      • deleteVerifiedEmail

        public void deleteVerifiedEmail​(DeleteVerifiedEmailRequest request)
        Delete verified email address
        参数:
        request - The request object includes the email address to delete, refer to com.baidubce.services.ses.model.DeleteVerifiedEmailRequest
        另请参阅:
        DeleteVerifiedEmailRequest
      • verifyDomain

        public VerifyDomainResponse verifyDomain​(VerifyDomainRequest request)
        Verify the domain

        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 verify
        另请参阅:
        VerifyDomainRequest
      • verifyDKIM

        public VerifyDKIMResponse verifyDKIM​(VerifyDKIMRequest request)
        Verify the DKIM

        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 verify
        返回:
        The response object includes a group of tokens
        另请参阅:
        VerifyDKIMRequest, VerifyDKIMResponse
      • disableDKIM

        public void disableDKIM​(String domainName)
      • disableDKIM

        public void disableDKIM​(EnableDKIMRequest request)
        Disable the DKIM

        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 disable
        另请参阅:
        EnableDKIMRequest
      • enableDKIM

        public void enableDKIM​(String domainName)
      • enableDKIM

        public void enableDKIM​(EnableDKIMRequest request)
        Enable the DKIM

        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 enable
      • listVerifiedDomain

        public ListVerifiedDomainResponse listVerifiedDomain​(SesRequest request)
        Get the list of verified domain
        参数:
        request - The request object which it's credentials can be override
        返回:
        The response object which includes the detail of verified domain
        另请参阅:
        ListVerifiedDomainResponse
      • deleteVerifiedDomain

        public void deleteVerifiedDomain​(String domainName)
      • sendEmail

        public SendEmailResponse sendEmail​(String from,
                                           String[] toAddr,
                                           String subject,
                                           String body,
                                           File... attachmentFiles)
        Send email.

        Simple to send email without display name, all optional parameters use system default value.

        参数:
        from - The sender, which is required
        toAddr - The receive, which is required
        subject - The title of the email, which is required
        body - The content of the email, which is required
        attachmentFiles - The array of attachment file. If you need send attachment then set it, it's optional parameters
        另请参阅:
        sendEmail(com.baidubce.services.ses.model.SendEmailRequest request)
      • sendEmail

        public SendEmailResponse sendEmail​(String from,
                                           String displayName,
                                           String[] toAddr,
                                           String subject,
                                           String body,
                                           File... attachmentFiles)
        Send email.

        Simple to send email, all optional parameters use system default value.

        参数:
        from - The sender, which is required
        displayName - The display name of sender, which can be custom by the users themselves
        toAddr - The receive, which is required
        subject - The title of the email, which is required
        body - The content of the email, which is required
        attachmentFiles - The array of attachment file. If you need send attachment then set it, it's optional parameters
        另请参阅:
        sendEmail(com.baidubce.services.ses.model.SendEmailRequest request)
      • sendEmail

        public SendEmailResponse sendEmail​(String from,
                                           String displayName,
                                           String[] toAddr,
                                           String[] ccAddr,
                                           String[] bccAddr,
                                           String subject,
                                           String body,
                                           File... attachmentFiles)
        Send email.

        Simple to send email, partly optional parameters use system default value.

        参数:
        from - The sender, which is required
        displayName - The display name of sender, which can be custom by the users themselves
        toAddr - The receive, which is required
        ccAddr - The CC, which is optional
        bccAddr - The BCC which is optional
        subject - The title of the email, which is required
        body - The content of the email, which is required
        attachmentFiles - The array of attachment file. If you need send attachment then set it, it's optional parameters
        另请参阅:
        sendEmail(com.baidubce.services.ses.model.SendEmailRequest request)
      • sendEmail

        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)
        Send email.

        Full to send email, all optional parameters need you set.

        参数:
        from - The sender, which is required
        displayName - The display name of sender, which can be custom by the users themselves
        returnPath - Optional parameters
        replyTo - Optional parameters
        toAddr - The receive, which is required
        ccAddr - The CC, which is optional
        bccAddr - The BCC which is optional
        subject - The title of the email, which is required
        body - The content of the email, which is required
        priority - The priority of the email, which is Optional
        charset - The charset of the email, which is Optional
        attachmentFiles - The array of attachment file. If you need send attachment then set it, it's optional parameters
        另请参阅:
        sendEmail(com.baidubce.services.ses.model.SendEmailRequest request)
      • sendEmail

        public SendEmailResponse sendEmail​(SendEmailRequest request)
        Send email

        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.SendEmailRequest
        另请参阅:
        SendEmailRequest
      • setFeedback

        public void setFeedback​(SetFeedbackRequest request)
        Set feedback
        参数:
        request - The request object which includes the feedback information to set
        另请参阅:
        SetFeedbackRequest
      • getFeedback

        public GetFeedbackResponse getFeedback​(SesRequest request)
        Get feedback
        参数:
        request - The request object which it's credentials can be override
        返回:
        The response object which includes the feedback information
        另请参阅:
        GetFeedbackResponse
      • getQuota

        public GetQuotaResponse getQuota​(SesRequest request)
        Get quota
        参数:
        request - The request object which it's credentials can be override
        返回:
        The response object which includes the detail of quota
        另请参阅:
        GetQuotaResponse
      • setQuota

        public void setQuota​(SetQuotaRequest request)
        Set quota
        参数:
        request - The request object which includes the information of quota to set
        另请参阅:
        SetQuotaRequest
      • getFailedReason

        public GetFailedReasonResponse getFailedReason​(SesRequest request)
        Query the failed reason
        参数:
        request - The request object which it's credentials can be override
        返回:
        The response which includes the detail of failed reason
        另请参阅:
        GetFailedReasonResponse