PHP Класс SimpleEmailService

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$__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

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
getRequestHandler ( $verb )

Описание методов

__construct() публичный Метод

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
Результат void

__triggerError() публичный Метод

{@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
Результат void

deleteVerifiedEmailAddress() публичный Метод

Removes the specified email address from the list of verified addresses.
public deleteVerifiedEmailAddress ( string $email ) : array
$email string The email address to remove
Результат array The request id for this request.

enableVerifyHost() публичный Метод

DEPRECATED
public enableVerifyHost ( $enable = true )

enableVerifyPeer() публичный Метод

DEPRECATED
public enableVerifyPeer ( $enable = true )

getAccessKey() публичный Метод

Get AWS SES auth access key
public getAccessKey ( ) : string
Результат string

getBulkMode() публичный Метод

Get bulk email sending mode
public getBulkMode ( ) : boolean
Результат boolean

getHost() публичный Метод

Get AWS target host
public getHost ( ) : boolean
Результат boolean

getRequestHandler() защищенный Метод

protected getRequestHandler ( $verb )

getSecretKey() публичный Метод

Get AWS SES auth secret key
public getSecretKey ( ) : string
Результат string

getSendQuota() публичный Метод

See http://docs.amazonwebservices.com/ses/latest/APIReference/API_GetSendQuota.html
public getSendQuota ( ) : array
Результат array An array containing information on this account's activity limits.

getSendStatistics() публичный Метод

See http://docs.amazonwebservices.com/ses/latest/APIReference/API_GetSendStatistics.html
public getSendStatistics ( ) : array
Результат array An array of activity statistics. Each array item covers a 15-minute period.

getVerifyHost() публичный Метод

Get the verify host CURL mode
public getVerifyHost ( ) : boolean
Результат boolean

getVerifyPeer() публичный Метод

Get the verify peer CURL mode
public getVerifyPeer ( ) : boolean
Результат boolean

listVerifiedEmailAddresses() публичный Метод

Lists the email addresses that have been verified and can be used as the 'From' address
public listVerifiedEmailAddresses ( ) : array
Результат array An array containing two items: a list of verified email addresses, and the request id.

sendEmail() публичный Метод

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)
Результат 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() публичный Метод

Set AWS access key and secret key
public setAuth ( string $accessKey, string $secretKey ) : SimpleEmailService
$accessKey string Access key
$secretKey string Secret key
Результат SimpleEmailService $this

setBulkMode() публичный Метод

Enable/disable bulk email sending mode
public setBulkMode ( boolean $enable = true ) : SimpleEmailService
$enable boolean New status for the mode
Результат SimpleEmailService $this

setVerifyHost() публичный Метод

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
Результат SimpleEmailService $this

setVerifyPeer() публичный Метод

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
Результат SimpleEmailService $this

verifyEmailAddress() публичный Метод

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
Результат array The request id for this request.

verifyHost() публичный Метод

DEPRECATED
public verifyHost ( )

verifyPeer() публичный Метод

DEPRECATED
public verifyPeer ( )

Описание свойств

$__accessKey защищенное свойство

AWS SES Access key
protected $__accessKey

$__bulk_sending_mode защищенное свойство

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

$__host защищенное свойство

AWS SES Target host of region
protected $__host

$__secretKey защищенное свойство

AWS Secret key
protected $__secretKey

$__ses_request защищенное свойство

Optionally reusable SimpleEmailServiceRequest instance
protected $__ses_request

$__trigger_errors защищенное свойство

Enable/disable
protected $__trigger_errors

$__verifyHost защищенное свойство

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

$__verifyPeer защищенное свойство

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