PHP Class Naux\Mail\SendCloudTransport

User: Xuan Date: 11/19/15 Time: 9:39 AM.
Inheritance: extends Illuminate\Mail\Transport\Transport
Datei anzeigen Open project: NauxLiu/Laravel-SendCloud

Public Methods

Method Description
__construct ( $api_user, $api_key ) SendCloudTransport constructor.
addQuery ( $name, $contents, null $filename = null ) 添加查询条件.
send ( Swift_Mime_Message $message, string[] &$failedRecipients = null ) : integer Send the given Message.

Protected Methods

Method Description
getAddress ( $data ) : mixed 获取地址.
getAddresses ( $data ) : string | null 获取多个地址,用 ; 分隔.
getFromName ( Swift_Mime_Message $message ) : mixed 获取发件人名.
response ( Psr\Http\Message\ResponseInterface $response ) : boolean 解析 SendCloud 返回值,失败抛出异常.
sendRawMessage ( Swift_Mime_Message $message ) : boolean 发送普通邮件.
sendTemplate ( Swift_Mime_Message $message ) : boolean 发送模板邮件.

Method Details

__construct() public method

SendCloudTransport constructor.
public __construct ( $api_user, $api_key )
$api_user
$api_key

addQuery() public method

添加查询条件.
public addQuery ( $name, $contents, null $filename = null )
$name
$contents
$filename null

getAddress() protected method

获取地址.
protected getAddress ( $data ) : mixed
$data
return mixed

getAddresses() protected method

获取多个地址,用 ; 分隔.
protected getAddresses ( $data ) : string | null
$data
return string | null

getFromName() protected method

获取发件人名.
protected getFromName ( Swift_Mime_Message $message ) : mixed
$message Swift_Mime_Message
return mixed

response() protected method

解析 SendCloud 返回值,失败抛出异常.
protected response ( Psr\Http\Message\ResponseInterface $response ) : boolean
$response Psr\Http\Message\ResponseInterface
return boolean

send() public method

Recipient/sender data will be retrieved from the Message API. The return value is the number of recipients who were accepted for delivery.
public send ( Swift_Mime_Message $message, string[] &$failedRecipients = null ) : integer
$message Swift_Mime_Message
$failedRecipients string[] An array of failures by-reference
return integer

sendRawMessage() protected method

发送普通邮件.
protected sendRawMessage ( Swift_Mime_Message $message ) : boolean
$message Swift_Mime_Message
return boolean

sendTemplate() protected method

发送模板邮件.
protected sendTemplate ( Swift_Mime_Message $message ) : boolean
$message Swift_Mime_Message
return boolean