VerifyEmailAddress() public method

Verifies an email address. This action causes a confirmation email message to be sent to the specified address.

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

This action is throttled at one request per second.

public VerifyEmailAddress ( VerifyEmailAddressRequest request ) : VerifyEmailAddressResponse
request VerifyEmailAddressRequest Container for the necessary parameters to execute the VerifyEmailAddress service method.
return VerifyEmailAddressResponse
Esempio n. 1
0
    public static void SESVerifyEmailAddress()
    {
      #region SESVerifyEmailAddress
      var sesClient = new AmazonSimpleEmailServiceClient();

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

      sesClient.VerifyEmailAddress(request); 
      #endregion
    }
Esempio n. 2
0
 public bool VerifyEmailAddress(string email)
 {
     bool result = false;
     client = new AmazonSimpleEmailServiceClient(AccessKey, SecretKey);
     List<String> verifiedEmailAddresses = ListVerifiedEmailAddresses();
     VerifyEmailAddressRequest request = new VerifyEmailAddressRequest();
     VerifyEmailAddressResponse response = new VerifyEmailAddressResponse();
     if (IsValidMail(email) == true)
     {
         if (!verifiedEmailAddresses.Contains(email))
         {
             if (client != null)
             {
                 request.EmailAddress = email.Trim();
                 response = client.VerifyEmailAddress(request);
                 if (!string.IsNullOrEmpty(response.ResponseMetadata.RequestId))
                 {
                     result = true;
                 }
             }
         }
     }
     return result;
 }
        /// <summary>
        /// Sends a request for email address verification.
        /// </summary>
        /// <param name="emailAddress">Email address to verify</param>
        /// <returns></returns>
        public bool sendEmailVerificationRequest(string emailAddress)
        {
            bool ret = false;
            using (AmazonSimpleEmailServiceClient client = new AmazonSimpleEmailServiceClient(_accessKeyID, _secretAccessKeyID))
            {

                VerifyEmailAddressRequest request = new VerifyEmailAddressRequest();
                request.EmailAddress = emailAddress;
                VerifyEmailAddressResponse response = client.VerifyEmailAddress(request);
                ret = true;
            }

            return ret;

        }