Class: AWS::SimpleEmailService::EmailAddressCollection

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/aws/simple_email_service/email_address_collection.rb

Overview

Helps you manage your verified SimpleEmailService email addresses.

Instance Method Summary collapse

Instance Method Details

#delete(email_address) ⇒ nil

Parameters:

  • email_address (String)

    An email address to remove from the list of verified email addresses. Useful for cleanup as there is a 100 email address limit.

Returns:

  • (nil)


40
41
42
43
# File 'lib/aws/simple_email_service/email_address_collection.rb', line 40

def delete email_address
  client.delete_verified_email_address(:email_address => email_address)
  nil
end

#each(&block) ⇒ nil

Yields each verified email address as a string.

Returns:

  • (nil)

    yielded.



54
55
56
57
58
59
60
# File 'lib/aws/simple_email_service/email_address_collection.rb', line 54

def each &block
  response = client.list_verified_email_addresses({})
  response.verified_email_addresses.each do |email_address|
    yield(email_address)
  end
  nil
end

#include?Boolean Also known as: verified?

Returns:

  • (Boolean)


45
46
47
48
# File 'lib/aws/simple_email_service/email_address_collection.rb', line 45

def include?
  # this is so jruby can detect that verified? is an alias
  super
end

#verify(email_address) ⇒ nil Also known as: create

Requets for an email address to be verified. An email will be sent to the given email_address with a link to click. Once the link has been followed the email_address will be verified.

Parameters:

  • email_address (String)

    The email address to verify.

Returns:

  • (nil)


29
30
31
32
# File 'lib/aws/simple_email_service/email_address_collection.rb', line 29

def verify email_address
  client.verify_email_address(:email_address => email_address)
  nil
end