PHP 클래스 Webiny\Component\Mailer\Bridge\SwiftMailer\Message

상속: implements Webiny\Component\Mailer\Bridge\MessageInterface, use trait Webiny\Component\StdLib\StdLibTrait
파일 보기 프로젝트 열기: Webiny/Framework 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( ConfigObject $config = null )
__invoke ( )
addAttachment ( File $file, string $fileName = '', string $type = 'plain/text' ) Attach a file to your message.
addBcc ( Email $email )
addCc ( Email $email )
addFrom ( Email $email )
addHeader ( string $name, string $value, null | array $params = null ) Adds a header to the message.
addTo ( Email $email )
getBcc ( ) : array Returns a list of defined bcc recipients.
getBody ( ) : string Returns the body of the message.
getCc ( ) : array Returns a list of addresses to whom the message will be copied to.
getChildren ( )
getContentTransferEncoding ( ) : string Get the defined encoding scheme.
getContentType ( ) : string Returns the defined content type of the message.
getFrom ( ) : Email Returns the person who sent the message.
getHeader ( string $name ) : mixed Get a header from the message.
getHeaders ( ) : array Get all headers from the message.
getReplyTo ( ) : Email Returns the reply-to address.
getReturnPath ( ) : string Returns the defined return-path.
getSender ( ) : Email Return the person who sent the message.
getSubject ( ) : string Get the current message subject.
getTo ( ) : array Returns a list of defined recipients.
setBcc ( $bcc )
setBody ( string $content, string $type = 'text/html', string $charset = 'utf-8' ) : Webiny\Component\Mailer\MessageInterface Set the message body.
setCc ( $cc )
setContentTransferEncoding ( string $encoding ) Specifies the encoding scheme in the message.
setContentType ( string $contentType ) Specifies the format of the message (usually text/plain or text/html).
setFrom ( Email $from )
setHeaders ( array | ArrayObject $headers ) Set multiple headers
setReplyTo ( Email $replyTo )
setReturnPath ( string $returnPath ) Defines the return path for the email.
setSender ( Email $sender )
setSubject ( string $subject ) Set the message subject.
setTo ( $to )

메소드 상세

__construct() 공개 메소드

public __construct ( ConfigObject $config = null )
$config Webiny\Component\Config\ConfigObject

__invoke() 공개 메소드

public __invoke ( )

addAttachment() 공개 메소드

Attach a file to your message.
public addAttachment ( File $file, string $fileName = '', string $type = 'plain/text' )
$file Webiny\Component\Storage\File\File File instance
$fileName string Optional name that will be set for the attachment.
$type string Optional MIME type of the attachment

addBcc() 공개 메소드

public addBcc ( Email $email )
$email Webiny\Component\Mailer\Email

addCc() 공개 메소드

public addCc ( Email $email )
$email Webiny\Component\Mailer\Email

addFrom() 공개 메소드

public addFrom ( Email $email )
$email Webiny\Component\Mailer\Email

addHeader() 공개 메소드

Adds a header to the message.
public addHeader ( string $name, string $value, null | array $params = null )
$name string Header name.
$value string Header value.
$params null | array Optional array of parameters.

addTo() 공개 메소드

public addTo ( Email $email )
$email Webiny\Component\Mailer\Email

getBcc() 공개 메소드

Returns a list of defined bcc recipients.
public getBcc ( ) : array
리턴 array

getBody() 공개 메소드

Returns the body of the message.
public getBody ( ) : string
리턴 string

getCc() 공개 메소드

Returns a list of addresses to whom the message will be copied to.
public getCc ( ) : array
리턴 array

getChildren() 공개 메소드

public getChildren ( )

getContentTransferEncoding() 공개 메소드

Get the defined encoding scheme.

getContentType() 공개 메소드

Returns the defined content type of the message.
public getContentType ( ) : string
리턴 string

getFrom() 공개 메소드

Returns the person who sent the message.
public getFrom ( ) : Email
리턴 Webiny\Component\Mailer\Email

getHeader() 공개 메소드

Get a header from the message.
public getHeader ( string $name ) : mixed
$name string Header name.
리턴 mixed

getHeaders() 공개 메소드

Get all headers from the message.
public getHeaders ( ) : array
리턴 array

getReplyTo() 공개 메소드

Returns the reply-to address.
public getReplyTo ( ) : Email
리턴 Webiny\Component\Mailer\Email

getReturnPath() 공개 메소드

Returns the defined return-path.
public getReturnPath ( ) : string
리턴 string

getSender() 공개 메소드

Return the person who sent the message.
public getSender ( ) : Email
리턴 Webiny\Component\Mailer\Email

getSubject() 공개 메소드

Get the current message subject.
public getSubject ( ) : string
리턴 string Message subject.

getTo() 공개 메소드

Returns a list of defined recipients.
public getTo ( ) : array
리턴 array

setBcc() 공개 메소드

public setBcc ( $bcc )

setBody() 공개 메소드

Set the message body.
public setBody ( string $content, string $type = 'text/html', string $charset = 'utf-8' ) : Webiny\Component\Mailer\MessageInterface
$content string The content of the body.
$type string Content type. Default 'text/html'.
$charset string Content body charset. Default 'utf-8'.
리턴 Webiny\Component\Mailer\MessageInterface

setCc() 공개 메소드

public setCc ( $cc )

setContentTransferEncoding() 공개 메소드

Specifies the encoding scheme in the message.
public setContentTransferEncoding ( string $encoding )
$encoding string

setContentType() 공개 메소드

Specifies the format of the message (usually text/plain or text/html).
public setContentType ( string $contentType )
$contentType string

setFrom() 공개 메소드

public setFrom ( Email $from )
$from Webiny\Component\Mailer\Email

setHeaders() 공개 메소드

Set multiple headers
public setHeaders ( array | ArrayObject $headers )
$headers array | Webiny\Component\StdLib\StdObject\ArrayObject\ArrayObject

setReplyTo() 공개 메소드

public setReplyTo ( Email $replyTo )
$replyTo Webiny\Component\Mailer\Email

setReturnPath() 공개 메소드

By default it should be set to the sender.
public setReturnPath ( string $returnPath )
$returnPath string

setSender() 공개 메소드

public setSender ( Email $sender )
$sender Webiny\Component\Mailer\Email

setSubject() 공개 메소드

Set the message subject.
public setSubject ( string $subject )
$subject string Message subject.

setTo() 공개 메소드

public setTo ( $to )