Class: AWS::SES::Addresses

Inherits:
Base
  • Object
show all
Defined in:
lib/aws/ses/addresses.rb

Overview

AWS::SES::Addresses provides for:

  • Listing verified e-mail addresses

  • Adding new e-mail addresses to verify

  • Deleting verified e-mail addresses

You can access these methods as follows:

ses = AWS::SES::Base.new( ... connection info ... )

# Get a list of verified addresses
ses.addresses.list.result

# Add a new e-mail address to verify
ses.addresses.verify('[email protected]')

# Delete an e-mail address
ses.addresses.delete('[email protected]')

Instance Attribute Summary

Attributes inherited from Base

#port, #proxy_server, #server, #settings, #use_ssl

Instance Method Summary collapse

Methods inherited from Base

#addresses, #connection, #get_aws_auth_param, #request

Methods included from Info

#quota, #statistics

Methods included from SendEmail

#send_email, #send_raw_email

Constructor Details

#initialize(ses) ⇒ Addresses

Returns a new instance of Addresses.


21
22
23
# File 'lib/aws/ses/addresses.rb', line 21

def initialize(ses)
  @ses = ses
end

Instance Method Details

#delete(email) ⇒ Object


41
42
43
44
45
# File 'lib/aws/ses/addresses.rb', line 41

def delete(email)
  @ses.request('DeleteVerifiedEmailAddress',
    'EmailAddress' => email
  )
end

#listObject

List all verified e-mail addresses

Usage: ses.addresses.list.result

>

'[email protected]', [email protected]'

31
32
33
# File 'lib/aws/ses/addresses.rb', line 31

def list
  @ses.request('ListVerifiedEmailAddresses')
end

#verify(email) ⇒ Object


35
36
37
38
39
# File 'lib/aws/ses/addresses.rb', line 35

def verify(email)
  @ses.request('VerifyEmailAddress',
    'EmailAddress' => email
  )
end