PHP 클래스 SimpleEmailServiceMessage

파일 보기 프로젝트 열기: daniel-zahariev/php-aws-ses 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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