PHP Класс SimpleEmailServiceMessage

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

Открытые свойства

Свойство Тип Описание
$attachments
$bcc these are not to be used outside of the SimpleEmailService class!
$cc these are not to be used outside of the SimpleEmailService class!
$customHeaders
$from
$messageHtmlCharset
$messageTextCharset
$messagehtml
$messagetext
$recipientsCharset these are not to be used outside of the SimpleEmailService class!
$replyto these are not to be used outside of the SimpleEmailService class!
$returnpath
$subject
$subjectCharset
$to these are not to be used outside of the SimpleEmailService class!

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

Метод Описание
__construct ( )
addAttachmentFromData ( string $name, string $data, string $mimeType = 'application/octet-stream', string $contentId = null, string $attachmentType = 'attachment' ) : SimpleEmailServiceMessage Add email attachment by directly passing the content
addAttachmentFromFile ( string $name, string $path, string $mimeType = 'application/octet-stream', string $contentId = null, string $attachmentType = 'attachment' ) : boolean Add email attachment by passing file path
addAttachmentFromUrl ( string $name, string $url, string $mimeType = 'application/octet-stream', string $contentId = null, string $attachmentType = 'attachment' ) : boolean Add email attachment by passing file path
addBCC ( $bcc )
addCC ( $cc )
addCustomHeader ( string $header ) : SimpleEmailServiceMessage Add custom header - this works only with SendRawEmail
addReplyTo ( $replyto )
addTo ( $to ) addTo, addCC, addBCC, and addReplyTo have the following behavior: If a single address is passed, it is appended to the current list of addresses.
clearBCC ( ) Clear the BCC: email address(es) for the message
clearCC ( ) Clear the CC: email address(es) for the message
clearRecipients ( ) Clear all of the message recipients in one go
clearReplyTo ( ) Clear the Reply-To: email address(es) for the message
clearTo ( ) Clear the To: email address(es) for the message
encodeRecipients ( $recipient ) : string Encode recipient with the specified charset in recipientsCharset
getRawMessage ( ) : string Get the raw mail message
hasInlineAttachments ( ) : boolean Get the existence of attached inline messages
setFrom ( $from )
setMessageCharset ( $textCharset, $htmlCharset = null )
setMessageFromFile ( $textfile, $htmlfile = null )
setMessageFromString ( $text, $html = null )
setMessageFromURL ( $texturl, $htmlurl = null )
setRecipientsCharset ( $charset )
setReturnPath ( $returnpath )
setSubject ( $subject )
setSubjectCharset ( $charset )
validate ( ) : boolean Validates whether the message object has sufficient information to submit a request to SES.

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

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

public __construct ( )

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

Add email attachment by directly passing the content
public addAttachmentFromData ( string $name, string $data, string $mimeType = 'application/octet-stream', string $contentId = null, string $attachmentType = 'attachment' ) : SimpleEmailServiceMessage
$name string The name of the file attachment as it will appear in the email
$data string The contents of the attachment file
$mimeType string Specify custom MIME type
$contentId string Content ID of the attachment for inclusion in the mail message
$attachmentType string Attachment type: attachment or inline
Результат SimpleEmailServiceMessage $this

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

Add email attachment by passing file path
public addAttachmentFromFile ( string $name, string $path, string $mimeType = 'application/octet-stream', string $contentId = null, string $attachmentType = 'attachment' ) : boolean
$name string The name of the file attachment as it will appear in the email
$path string Path to the attachment file
$mimeType string Specify custom MIME type
$contentId string Content ID of the attachment for inclusion in the mail message
$attachmentType string Attachment type: attachment or inline
Результат boolean Status of the operation

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

Add email attachment by passing file path
public addAttachmentFromUrl ( string $name, string $url, string $mimeType = 'application/octet-stream', string $contentId = null, string $attachmentType = 'attachment' ) : boolean
$name string The name of the file attachment as it will appear in the email
$url string URL to the attachment file
$mimeType string Specify custom MIME type
$contentId string Content ID of the attachment for inclusion in the mail message
$attachmentType string Attachment type: attachment or inline
Результат boolean Status of the operation

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

См. также: addTo()
public addBCC ( $bcc )

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

См. также: addTo()
public addCC ( $cc )

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

Add custom header - this works only with SendRawEmail
public addCustomHeader ( string $header ) : SimpleEmailServiceMessage
$header string Your custom header
Результат SimpleEmailServiceMessage $this

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

См. также: addTo()
public addReplyTo ( $replyto )

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

If an array of addresses is passed, that array is merged into the current list.
public addTo ( $to )

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

Clear the BCC: email address(es) for the message
public clearBCC ( )

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

Clear the CC: email address(es) for the message
public clearCC ( )

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

Clear all of the message recipients in one go
public clearRecipients ( )

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

Clear the Reply-To: email address(es) for the message
public clearReplyTo ( )

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

Clear the To: email address(es) for the message
public clearTo ( )

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

Encode recipient with the specified charset in recipientsCharset
public encodeRecipients ( $recipient ) : string
Результат string Encoded recipients joined with comma

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

Get the raw mail message
public getRawMessage ( ) : string
Результат string

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

Get the existence of attached inline messages
public hasInlineAttachments ( ) : boolean
Результат boolean

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

public setFrom ( $from )

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

public setMessageCharset ( $textCharset, $htmlCharset = null )

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

public setMessageFromFile ( $textfile, $htmlfile = null )

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

public setMessageFromString ( $text, $html = null )

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

public setMessageFromURL ( $texturl, $htmlurl = null )

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

public setRecipientsCharset ( $charset )

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

public setReturnPath ( $returnpath )

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

public setSubject ( $subject )

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

public setSubjectCharset ( $charset )

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

This does not guarantee the message will arrive, nor that the request will succeed; instead, it makes sure that no required fields are missing. This is used internally before attempting a SendEmail or SendRawEmail request, but it can be used outside of this file if verification is desired. May be useful if e.g. the data is being populated from a form; developers can generally use this function to verify completeness instead of writing custom logic.
public validate ( ) : boolean
Результат boolean

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

$attachments публичное свойство

public $attachments

$bcc публичное свойство

these are not to be used outside of the SimpleEmailService class!
public $bcc

$cc публичное свойство

these are not to be used outside of the SimpleEmailService class!
public $cc

$customHeaders публичное свойство

public $customHeaders

$from публичное свойство

public $from

$messageHtmlCharset публичное свойство

public $messageHtmlCharset

$messageTextCharset публичное свойство

public $messageTextCharset

$messagehtml публичное свойство

public $messagehtml

$messagetext публичное свойство

public $messagetext

$recipientsCharset публичное свойство

these are not to be used outside of the SimpleEmailService class!
public $recipientsCharset

$replyto публичное свойство

these are not to be used outside of the SimpleEmailService class!
public $replyto

$returnpath публичное свойство

public $returnpath

$subject публичное свойство

public $subject

$subjectCharset публичное свойство

public $subjectCharset

$to публичное свойство

these are not to be used outside of the SimpleEmailService class!
public $to