PHP Class SimpleEmailService

Afficher le fichier Open project: daniel-zahariev/php-aws-ses Class Usage Examples

Protected Properties

Свойство Type Description
$__accessKey AWS SES Access key
$__bulk_sending_mode Controls the reuse of CURL hander for sending a bulk of messages
$__host AWS SES Target host of region
$__secretKey AWS Secret key
$__ses_request Optionally reusable SimpleEmailServiceRequest instance
$__trigger_errors Enable/disable
$__verifyHost Controls CURLOPT_SSL_VERIFYHOST setting for SimpleEmailServiceRequest's curl handler
$__verifyPeer Controls CURLOPT_SSL_VERIFYPEER setting for SimpleEmailServiceRequest's curl handler

Méthodes publiques

Méthode Description
__construct ( string $accessKey = null, string $secretKey = null, string $host = self::AWS_US_EAST_1, boolean $trigger_errors = true ) : void Constructor
__triggerError ( string $functionname, array $error ) : void Trigger an error message
deleteVerifiedEmailAddress ( string $email ) : array Removes the specified email address from the list of verified addresses.
enableVerifyHost ( $enable = true ) DEPRECATED
enableVerifyPeer ( $enable = true ) DEPRECATED
getAccessKey ( ) : string Get AWS SES auth access key
getBulkMode ( ) : boolean Get bulk email sending mode
getHost ( ) : boolean Get AWS target host
getSecretKey ( ) : string Get AWS SES auth secret key
getSendQuota ( ) : array Retrieves information on the current activity limits for this account.
getSendStatistics ( ) : array Retrieves statistics for the last two weeks of activity on this account.
getVerifyHost ( ) : boolean Get the verify host CURL mode
getVerifyPeer ( ) : boolean Get the verify peer CURL mode
listVerifiedEmailAddresses ( ) : array Lists the email addresses that have been verified and can be used as the 'From' address
sendEmail ( SimpleEmailServiceMessage $sesMessage, boolean $use_raw_request = false, boolean $trigger_error = null ) : array Given a SimpleEmailServiceMessage object, submits the message to the service for sending.
setAuth ( string $accessKey, string $secretKey ) : SimpleEmailService Set AWS access key and secret key
setBulkMode ( boolean $enable = true ) : SimpleEmailService Enable/disable bulk email sending mode
setVerifyHost ( boolean $enable = true ) : SimpleEmailService Enable/disable CURLOPT_SSL_VERIFYHOST for SimpleEmailServiceRequest's curl handler verifyHost and verifyPeer determine whether curl verifies ssl certificates.
setVerifyPeer ( boolean $enable = true ) : SimpleEmailService Enable/disable CURLOPT_SSL_VERIFYPEER for SimpleEmailServiceRequest's curl handler verifyHost and verifyPeer determine whether curl verifies ssl certificates.
verifyEmailAddress ( string $email ) : array Requests verification of the provided email address, so it can be used as the 'From' address when sending emails through SimpleEmailService.
verifyHost ( ) DEPRECATED
verifyPeer ( ) DEPRECATED

Méthodes protégées

Méthode Description
getRequestHandler ( $verb )

Method Details

__construct() public méthode

Constructor
public __construct ( string $accessKey = null, string $secretKey = null, string $host = self::AWS_US_EAST_1, boolean $trigger_errors = true ) : void
$accessKey string Access key
$secretKey string Secret key
$host string Amazon Host through which to send the emails
$trigger_errors boolean Trigger PHP errors when AWS SES API returns an error
Résultat void

__triggerError() public méthode

{@internal Used by member functions to output errors}
public __triggerError ( string $functionname, array $error ) : void
$functionname string The name of the function that failed
$error array Array containing error information
Résultat void

deleteVerifiedEmailAddress() public méthode

Removes the specified email address from the list of verified addresses.
public deleteVerifiedEmailAddress ( string $email ) : array
$email string The email address to remove
Résultat array The request id for this request.

enableVerifyHost() public méthode

DEPRECATED
public enableVerifyHost ( $enable = true )

enableVerifyPeer() public méthode

DEPRECATED
public enableVerifyPeer ( $enable = true )

getAccessKey() public méthode

Get AWS SES auth access key
public getAccessKey ( ) : string
Résultat string

getBulkMode() public méthode

Get bulk email sending mode
public getBulkMode ( ) : boolean
Résultat boolean

getHost() public méthode

Get AWS target host
public getHost ( ) : boolean
Résultat boolean

getRequestHandler() protected méthode

protected getRequestHandler ( $verb )

getSecretKey() public méthode

Get AWS SES auth secret key
public getSecretKey ( ) : string
Résultat string

getSendQuota() public méthode

See http://docs.amazonwebservices.com/ses/latest/APIReference/API_GetSendQuota.html
public getSendQuota ( ) : array
Résultat array An array containing information on this account's activity limits.

getSendStatistics() public méthode

See http://docs.amazonwebservices.com/ses/latest/APIReference/API_GetSendStatistics.html
public getSendStatistics ( ) : array
Résultat array An array of activity statistics. Each array item covers a 15-minute period.

getVerifyHost() public méthode

Get the verify host CURL mode
public getVerifyHost ( ) : boolean
Résultat boolean

getVerifyPeer() public méthode

Get the verify peer CURL mode
public getVerifyPeer ( ) : boolean
Résultat boolean

listVerifiedEmailAddresses() public méthode

Lists the email addresses that have been verified and can be used as the 'From' address
public listVerifiedEmailAddresses ( ) : array
Résultat array An array containing two items: a list of verified email addresses, and the request id.

sendEmail() public méthode

Given a SimpleEmailServiceMessage object, submits the message to the service for sending.
public sendEmail ( SimpleEmailServiceMessage $sesMessage, boolean $use_raw_request = false, boolean $trigger_error = null ) : array
$sesMessage SimpleEmailServiceMessage An instance of the message class
$use_raw_request boolean If this is true or there are attachments to the email `SendRawEmail` call will be used
$trigger_error boolean Optionally overwrite the class setting for triggering an error (with type check to true/false)
Résultat array An array containing the unique identifier for this message and a separate request id. Returns false if the provided message is missing any required fields. @link(AWS SES Response formats, http://docs.aws.amazon.com/ses/latest/DeveloperGuide/query-interface-responses.html)

setAuth() public méthode

Set AWS access key and secret key
public setAuth ( string $accessKey, string $secretKey ) : SimpleEmailService
$accessKey string Access key
$secretKey string Secret key
Résultat SimpleEmailService $this

setBulkMode() public méthode

Enable/disable bulk email sending mode
public setBulkMode ( boolean $enable = true ) : SimpleEmailService
$enable boolean New status for the mode
Résultat SimpleEmailService $this

setVerifyHost() public méthode

It may be necessary to disable these checks on certain systems. These only have an effect if SSL is enabled.
public setVerifyHost ( boolean $enable = true ) : SimpleEmailService
$enable boolean New status for the mode
Résultat SimpleEmailService $this

setVerifyPeer() public méthode

It may be necessary to disable these checks on certain systems. These only have an effect if SSL is enabled.
public setVerifyPeer ( boolean $enable = true ) : SimpleEmailService
$enable boolean New status for the mode
Résultat SimpleEmailService $this

verifyEmailAddress() public méthode

After submitting this request, you should receive a verification email from Amazon at the specified address containing instructions to follow.
public verifyEmailAddress ( string $email ) : array
$email string The email address to get verified
Résultat array The request id for this request.

verifyHost() public méthode

DEPRECATED
public verifyHost ( )

verifyPeer() public méthode

DEPRECATED
public verifyPeer ( )

Property Details

$__accessKey protected_oe property

AWS SES Access key
protected $__accessKey

$__bulk_sending_mode protected_oe property

Controls the reuse of CURL hander for sending a bulk of messages
protected $__bulk_sending_mode

$__host protected_oe property

AWS SES Target host of region
protected $__host

$__secretKey protected_oe property

AWS Secret key
protected $__secretKey

$__ses_request protected_oe property

Optionally reusable SimpleEmailServiceRequest instance
protected $__ses_request

$__trigger_errors protected_oe property

Enable/disable
protected $__trigger_errors

$__verifyHost protected_oe property

Controls CURLOPT_SSL_VERIFYHOST setting for SimpleEmailServiceRequest's curl handler
protected $__verifyHost

$__verifyPeer protected_oe property

Controls CURLOPT_SSL_VERIFYPEER setting for SimpleEmailServiceRequest's curl handler
protected $__verifyPeer