AWS SDK for Ruby
Developer Guide

Listing Valid Amazon SES Email Addresses

The following example demonstrates how to use the AWS SDK for Ruby to list the valid Amazon SES email addresses.

require 'aws-sdk-ses' # v2: require 'aws-sdk' # Create client in us-west-2 region client = Aws::SES::Client.new(region: 'us-west-2') # Get up to 1000 identities ids = client.list_identities({ identity_type: "EmailAddress" }) ids.identities.each do |email| attrs = client.get_identity_verification_attributes({ identities: [email] }) status = attrs.verification_attributes[email].verification_status # Display email addresses that have been verified if status == "Success" puts email end

See the complete example on GitHub.