AmazonSES Class
Properties Methods Events Configuration Settings Errors
The AmazonSES class provides a simple interface to Amazon's Simple Email Service (SES).
Syntax
class cloudmail.AmazonSES
Remarks
The AmazonSES component allows you to quickly and easily access Amazon's Simple Email Service (SES) through version 1 of the Amazon SES API. AmazonSES allows you to send both plaintext and HTML e-mails to recipients through your AWS account.
After signing up for AmazonSES you will use the Amazon provided access_key and secret_key to authenticate to Amazon. To send an e-mail set message_html or message_text along with from_, subject, send_to and call send.
Various other administrative methods are also available, such as list_identities, verify_domain, verify_email, and more.
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
access_key | The Access Key Id for the Amazon Web Services account. |
attachment_count | The number of records in the Attachment arrays. |
attachment_file | This property contains the path of a file on your system that you would like to send as an attachment with your message. |
attachment_name | This property contains the name of the attachment to be sent. |
b_cc | A comma separated list of addresses for blind carbon copies (optional). |
cc | A comma separated list of addresses for carbon copies (optional). |
delivery_notification_to | Email address to which to send a delivery notification. |
firewall_auto_detect | This property tells the class whether or not to automatically detect and use firewall system settings, if available. |
firewall_type | This property determines the type of firewall to connect through. |
firewall_host | This property contains the name or IP address of firewall (optional). |
firewall_password | This property contains a password if authentication is to be used when connecting through the firewall. |
firewall_port | This property contains the TCP port for the firewall Host . |
firewall_user | This property contains a user name if authentication is to be used connecting through a firewall. |
from_ | The email address of the sender (required). |
identity_count | The number of records in the Identity arrays. |
identity_attributes_type | Specifies the type of attribute. |
identity_name | The current identity name. |
identity_notification_bounce_topic | The Amazon Simple Notification Service (SNS) topic to which Amazon will publish bounce notifications. |
identity_notification_complaint_topic | The Amazon Simple Notification Service (SNS) topic to which Amazon will publish complaint notifications. |
identity_notification_forwarding_enabled | Specifies whether or not Amazon will forward feedback as email. |
identity_verification_status | The current verification status of the identity. |
identity_verification_token | The verification token for the domain. |
identity_marker | The offset marker used to navigate paged results. |
idle | The current status of the class. |
image_count | The number of records in the Image arrays. |
image_data | This property optionally specifies the image data. |
image_file | This property contains the name of the image files embedded into the HTML message. |
image_id | This property contains the content identifier for embedded images. |
image_type | This property contains the content type for embedded images. |
importance | Importance of the mail message (optional). |
local_host | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
message_html | The HTML version of the message. |
message_recipient_count | The number of records in the MessageRecipient arrays. |
message_recipient_address | This property contains the email address of the recipient. |
message_recipient_name | This property contains name of the recipient. |
message_recipient_options | This property contains the recipient sending options (used only by SMTP). |
message_recipient_type | This property contains the recipient type: To, Cc, or BCc. |
message_text | The plain text version of the message. |
other_headers | An RFC 822 compliant string consisting of extra headers. |
proxy_auth_scheme | This property is used to tell the class which type of authorization to perform when connecting to the proxy. |
proxy_auto_detect | This property tells the class whether or not to automatically detect and use proxy system settings, if available. |
proxy_password | This property contains a password if authentication is to be used for the proxy. |
proxy_port | This property contains the TCP port for the proxy Server (default 80). |
proxy_server | If a proxy Server is given, then the HTTP request is sent to the proxy instead of the server otherwise specified. |
proxy_ssl | This property determines when to use SSL for the connection to the proxy. |
proxy_user | This property contains a user name, if authentication is to be used for the proxy. |
quota_max_per_24_hours | The maximum number of emails that can be sent in a 24 hour period. |
quota_max_per_second | The maximum number of emails that can be sent per second. |
quota_sent_last_24_hours | The number of emails sent during the previous 24 hours. |
read_receipt_to | Email address to send a read receipt to. |
reply_to | A mail address to which to reply (optional). |
secret_key | The Secret Access Key for the Amazon Web Services account. |
send_stat_count | The number of records in the SendStat arrays. |
send_stat_bounces | The number of emails that bounced. |
send_stat_complaints | The number of emails that were rejected by the recipient. |
send_stat_delivery_attempts | The number of emails that have been sent or are queued to be sent. |
send_stat_rejects | The number of emails rejected by Amazon SES. |
send_stat_timestamp | The time of the data point. |
send_to | A comma separated list of addresses for destinations (required). |
ssl_accept_server_cert_encoded | The certificate (PEM/base64 encoded). |
ssl_cert_encoded | The certificate (PEM/base64 encoded). |
ssl_cert_store | The name of the certificate store for the client certificate. |
ssl_cert_store_password | If the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store. |
ssl_cert_store_type | The type of certificate store for this certificate. |
ssl_cert_subject | The subject of the certificate used for client authentication. |
ssl_server_cert_encoded | The certificate (PEM/base64 encoded). |
subject | The subject of the mail message (optional). |
timeout | A timeout for the class. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
add_attachment | Adds FileName as an attachment. |
config | Sets or retrieves a configuration setting. |
delete_identity | Deletes the identity. |
do_events | Processes events from the internal message queue. |
get_identity_attributes | Gets the attributes of the given identity. |
get_send_quota | Gets send quota information. |
get_send_statistics | Gets the user's sending statistics. |
get_x_value | Retrieves a valid XPath expression from the HTTP response after calling SendCustomRequest . |
interrupt | Interrupt the current method. |
list_identities | Lists the identities of the given type. |
reset | Resets request-related properties. |
send | Sends the message. |
send_custom_request | Allows the sending of a custom request to an Amazon web service. |
set_identity_feedback_forwarding | Enables or Disables feedback forwarding for the identity. |
set_identity_notification_topic | Sets the Bounce or Complaint notification topic for an identity. |
verify_domain | Verifies a domain. |
verify_email | Verifies an email address. |
Event List
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
on_error | Information about errors during data delivery. |
on_identity_list | Fired for every identity when ListIdentities is called. |
on_log | Fires once for each log message. |
on_ssl_server_authentication | Fired after the server presents its certificate to the client. |
on_ssl_status | Shows the progress of the secure connection. |
Configuration Settings
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
APIVersion | Service's API version. |
HTTPMethod | Specifies the HTTP method to use when sending a custom request. |
IsPaged | Specifies whether or not the results are paged. |
MaxListIdentityResults | That maximum number of identities to return when ListIdentities is called. |
MessageDate | The date of the mail message. |
MessageId | The message id of the mail message. |
MIMEMessage | MIME encoded message to send. |
ParseHTML | Whether or not to create a plaintext part from the HTML message. |
Priority | The priority of the mail message. |
Region | The region the class will make requests against. |
SignCustomRequest | Tells the class to sign the outgoing request. |
TransferredData | Returns the entire XML response received from the server. |
URL | If set, the default URL will be overridden by this value. |
XPath | Provides a way to point to a specific element in the returned XML or JSON response. |
XText | The text of the current element. |
AcceptEncoding | Used to tell the server which types of content encodings the client supports. |
AllowHTTPCompression | This property enables HTTP compression for receiving data. |
AllowHTTPFallback | Whether HTTP/2 connections are permitted to fallback to HTTP/1.1. |
Append | Whether to append data to LocalFile. |
Authorization | The Authorization string to be sent to the server. |
BytesTransferred | Contains the number of bytes transferred in the response data. |
ChunkSize | Specifies the chunk size in bytes when using chunked encoding. |
CompressHTTPRequest | Set to true to compress the body of a PUT or POST request. |
EncodeURL | If set to true the URL will be encoded by the class. |
FollowRedirects | Determines what happens when the server issues a redirect. |
GetOn302Redirect | If set to true the class will perform a GET on the new location. |
HTTP2HeadersWithoutIndexing | HTTP2 headers that should not update the dynamic header table with incremental indexing. |
HTTPVersion | The version of HTTP used by the class. |
IfModifiedSince | A date determining the maximum age of the desired document. |
KeepAlive | Determines whether the HTTP connection is closed after completion of the request. |
KerberosSPN | The Service Principal Name for the Kerberos Domain Controller. |
LogLevel | The level of detail that is logged. |
MaxRedirectAttempts | Limits the number of redirects that are followed in a request. |
NegotiatedHTTPVersion | The negotiated HTTP version. |
OtherHeaders | Other headers as determined by the user (optional). |
ProxyAuthorization | The authorization string to be sent to the proxy server. |
ProxyAuthScheme | The authorization scheme to be used for the proxy. |
ProxyPassword | A password if authentication is to be used for the proxy. |
ProxyPort | Port for the proxy server (default 80). |
ProxyServer | Name or IP address of a proxy server (optional). |
ProxyUser | A user name if authentication is to be used for the proxy. |
SentHeaders | The full set of headers as sent by the client. |
StatusLine | The first line of the last response from the server. |
TransferredData | The contents of the last response from the server. |
TransferredDataLimit | The maximum number of incoming bytes to be stored by the class. |
TransferredHeaders | The full set of headers as received from the server. |
TransferredRequest | The full request as sent by the client. |
UseChunkedEncoding | Enables or Disables HTTP chunked encoding for transfers. |
UseIDNs | Whether to encode hostnames to internationalized domain names. |
UsePlatformHTTPClient | Whether or not to use the platform HTTP client. |
UserAgent | Information about the user agent (browser). |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the class whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The port in the local host where the class binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
ProxyExceptionsList | A semicolon separated list of hosts and IPs to bypass when using a proxy. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
TcpNoDelay | Whether or not to delay when sending packets. |
UseIPv6 | Whether to use IPv6. |
LogSSLPackets | Controls whether SSL packets are logged when using the internal security API. |
OpenSSLCADir | The path to a directory containing CA certificates. |
OpenSSLCAFile | Name of the file containing the list of CA's trusted by your application. |
OpenSSLCipherList | A string that controls the ciphers to be used by SSL. |
OpenSSLPrngSeedData | The data to seed the pseudo random number generator (PRNG). |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCACertFilePaths | The paths to CA certificate files on Unix/Linux. |
SSLCACerts | A newline separated list of CA certificate to use during SSL client authentication. |
SSLCheckCRL | Whether to check the Certificate Revocation List for the server certificate. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledCipherSuites | The cipher suite to be used in an SSL negotiation. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLEnableRenegotiation | Whether the renegotiation_info SSL extension is supported. |
SSLIncludeCertChain | Whether the entire certificate chain is included in the SSLServerAuthentication event. |
SSLNegotiatedCipher | Returns the negotiated ciphersuite. |
SSLNegotiatedCipherStrength | Returns the negotiated ciphersuite strength. |
SSLNegotiatedCipherSuite | Returns the negotiated ciphersuite. |
SSLNegotiatedKeyExchange | Returns the negotiated key exchange algorithm. |
SSLNegotiatedKeyExchangeStrength | Returns the negotiated key exchange algorithm strength. |
SSLNegotiatedVersion | Returns the negotiated protocol version. |
SSLProvider | The name of the security provider to use. |
SSLSecurityFlags | Flags that control certificate verification. |
SSLServerCACerts | A newline separated list of CA certificate to use during SSL server certificate validation. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True. |
TLS12SupportedGroups | The supported groups for ECC. |
TLS13KeyShareGroups | The groups for which to pregenerate key shares. |
TLS13SignatureAlgorithms | The allowed certificate signature algorithms. |
TLS13SupportedGroups | The supported groups for (EC)DHE key exchange. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |