VerifyEmailIdentity() public method

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

This action is throttled at one request per second.

public VerifyEmailIdentity ( VerifyEmailIdentityRequest request ) : VerifyEmailIdentityResponse
request VerifyEmailIdentityRequest Container for the necessary parameters to execute the VerifyEmailIdentity service method.
return VerifyEmailIdentityResponse
Beispiel #1
0
    public static void SESVerifyEmailIdentity()
    {
      #region SESVerifyEmailIdentity
      var sesClient = new AmazonSimpleEmailServiceClient();

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

      sesClient.VerifyEmailIdentity(request);
      #endregion
    }
Beispiel #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();

        VerifyEmailIdentityRequest Irequest = new VerifyEmailIdentityRequest();
        VerifyEmailIdentityResponse Iresponse = new VerifyEmailIdentityResponse();
        if (IsValidMail(email) == true)
        {
            if (!verifiedEmailAddresses.Contains(email))
            {
                if (client != null)
                {
                    Irequest.EmailAddress = email.Trim();
                    Iresponse = client.VerifyEmailIdentity(Irequest);
                    VerifyEmailIdentityResult rs = Iresponse.VerifyEmailIdentityResult;

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