DeleteVerifiedEmailAddress() публичный Метод

Deletes the specified email address from the list of verified addresses.

The DeleteVerifiedEmailAddress action is deprecated as of the May 15, 2012 release of Domain Verification. The DeleteIdentity action is now preferred.

This action is throttled at one request per second.

public DeleteVerifiedEmailAddress ( DeleteVerifiedEmailAddressRequest request ) : DeleteVerifiedEmailAddressResponse
request DeleteVerifiedEmailAddressRequest Container for the necessary parameters to execute the DeleteVerifiedEmailAddress service method.
Результат DeleteVerifiedEmailAddressResponse
Пример #1
0
    public bool DeleteEmailAddress(string email)
    {
        client = new AmazonSimpleEmailServiceClient(AccessKey, SecretKey);
        bool result = false;
        Amazon.SimpleEmail.Model.DeleteVerifiedEmailAddressRequest request = new Amazon.SimpleEmail.Model.DeleteVerifiedEmailAddressRequest();
        Amazon.SimpleEmail.Model.DeleteVerifiedEmailAddressResponse response = new Amazon.SimpleEmail.Model.DeleteVerifiedEmailAddressResponse();
        if (client != null)
        {
            request.EmailAddress = email.Trim();
            response = client.DeleteVerifiedEmailAddress(request);

            if (!string.IsNullOrEmpty(response.ResponseMetadata.RequestId))
            {
                result = true;
            }
        }

        return result;
    }
Пример #2
0
    public static void SESDeleteVerifiedEmailAddress()
    {
      #region SESDeleteVerifiedEmailAddress
      var sesClient = new AmazonSimpleEmailServiceClient();

      var request = new DeleteVerifiedEmailAddressRequest
      {
        EmailAddress = "*****@*****.**"
      };

      sesClient.DeleteVerifiedEmailAddress(request);
      #endregion
    }
        /// <summary>
        /// Deletes the verified email address.  This disables this email address from being a "sender" in SES
        /// </summary>
        /// <param name="emailAddress">Email Address to Remove</param>
        /// <returns></returns>
        public bool deleteVerifiedEmail(string emailAddress)
        {
            bool ret = false;
            using (AmazonSimpleEmailServiceClient client = new AmazonSimpleEmailServiceClient(_accessKeyID, _secretAccessKeyID))
            {

                DeleteVerifiedEmailAddressRequest request = new DeleteVerifiedEmailAddressRequest();
                request.EmailAddress = emailAddress;
                DeleteVerifiedEmailAddressResponse response = client.DeleteVerifiedEmailAddress(request);
                ret = true;
            }

            return ret;

        }