PHP Класс Swift_Mime_SimpleMessage

Автор: Chris Corbyn
Наследование: extends Swift_Mime_MimePart, implements Swift_Mime_Message
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_IdGenerator $idGenerator, string $charset = null ) Create a new SimpleMessage with $headers, $encoder and $cache.
__toString ( ) : string Returns a string representation of this object.
addBcc ( string $address, string $name = null ) Add a Bcc: address to this message.
addBcc ( string $address, string $name = null ) : Swift_Mime_SimpleMessage Add a Bcc: address to this message.
addCc ( string $address, string $name = null ) Add a Cc: address to this message.
addCc ( string $address, string $name = null ) : Swift_Mime_SimpleMessage Add a Cc: address to this message.
addFrom ( string $address, string $name = null ) Add a From: address to this message.
addFrom ( string $address, string $name = null ) : Swift_Mime_SimpleMessage Add a From: address to this message.
addReplyTo ( string $address, string $name = null ) Add a Reply-To: address to this message.
addReplyTo ( string $address, string $name = null ) : Swift_Mime_SimpleMessage Add a Reply-To: address to this message.
addTo ( string $address, string $name = null ) Add a To: address to this message.
addTo ( string $address, string $name = null ) : Swift_Mime_SimpleMessage Add a To: address to this message.
attach ( Swift_Mime_MimeEntity $entity ) Attach a {@link Swift_Mime_MimeEntity} such as an Attachment or MimePart.
attach ( Swift_Mime_MimeEntity $entity ) : Swift_Mime_SimpleMessage Attach a {@link Swift_Mime_MimeEntity} such as an Attachment or MimePart.
detach ( Swift_Mime_MimeEntity $entity ) Remove an already attached entity.
detach ( Swift_Mime_MimeEntity $entity ) : Swift_Mime_SimpleMessage Remove an already attached entity.
embed ( Swift_Mime_MimeEntity $entity ) : string Attach a {@link Swift_Mime_MimeEntity} and return it's CID source.
getBcc ( ) : array Get the Bcc addresses of this message.
getCc ( ) : array Get the Cc address of this message.
getDate ( ) : DateTimeInterface Get the date at which this message was created.
getFrom ( ) : mixed Get the from address of this message.
getNestingLevel ( ) : integer Always returns {@link LEVEL_TOP} for a message instance.
getPriority ( ) : integer Get the priority of this message.
getReadReceiptTo ( ) : string Get the addresses to which a read-receipt will be sent.
getReplyTo ( ) : string Get the reply-to address of this message.
getReturnPath ( ) : string Get the return-path (bounce address) of this message.
getSender ( ) : string Get the sender of this message.
getSubject ( ) : string Get the subject of this message.
getTo ( ) : array Get the To addresses of this message.
setBcc ( mixed $addresses, string $name = null ) Set the Bcc addresses of this message.
setBcc ( mixed $addresses, string $name = null ) : Swift_Mime_SimpleMessage Set the Bcc addresses of this message.
setCc ( mixed $addresses, string $name = null ) Set the Cc addresses of this message.
setCc ( mixed $addresses, string $name = null ) : Swift_Mime_SimpleMessage Set the Cc addresses of this message.
setDate ( DateTimeInterface $dateTime ) Set the date at which this message was created.
setDate ( DateTimeInterface $dateTime ) : Swift_Mime_SimpleMessage Set the date at which this message was created.
setFrom ( string | array $addresses, string $name = null ) Set the from address of this message.
setFrom ( string | array $addresses, string $name = null ) : Swift_Mime_SimpleMessage Set the from address of this message.
setPriority ( integer $priority ) Set the priority of this message.
setPriority ( integer $priority ) : Swift_Mime_SimpleMessage Set the priority of this message.
setReadReceiptTo ( array $addresses ) Ask for a delivery receipt from the recipient to be sent to $addresses.
setReadReceiptTo ( array $addresses ) : Swift_Mime_SimpleMessage Ask for a delivery receipt from the recipient to be sent to $addresses.
setReplyTo ( mixed $addresses, string $name = null ) Set the reply-to address of this message.
setReplyTo ( mixed $addresses, string $name = null ) : Swift_Mime_SimpleMessage Set the reply-to address of this message.
setReturnPath ( string $address ) Set the return-path (the bounce address) of this message.
setReturnPath ( string $address ) : Swift_Mime_SimpleMessage Set the return-path (the bounce address) of this message.
setSender ( string $address, string $name = null ) Set the sender of this message.
setSender ( string $address, string $name = null ) : Swift_Mime_SimpleMessage Set the sender of this message.
setSubject ( string $subject ) Set the subject of this message.
setSubject ( string $subject ) : Swift_Mime_SimpleMessage Set the subject of this message.
setTo ( mixed $addresses, string $name = null ) Set the to addresses of this message.
setTo ( mixed $addresses, string $name = null ) : Swift_Mime_SimpleMessage Set the to addresses of this message.
toByteStream ( Swift_InputByteStream $is ) Write this message to a {@link Swift_InputByteStream}.
toString ( ) : string Get this message as a complete string.

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

Метод Описание
becomeMimePart ( ) Turn the body of this message into a child of itself if needed
getIdField ( )

Приватные методы

Метод Описание
getTopNestingLevel ( ) Get the highest nesting level nested inside this message

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

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

Create a new SimpleMessage with $headers, $encoder and $cache.
public __construct ( Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_IdGenerator $idGenerator, string $charset = null )
$headers Swift_Mime_HeaderSet
$encoder Swift_Mime_ContentEncoder
$cache Swift_KeyCache
$idGenerator Swift_IdGenerator
$charset string

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

Returns a string representation of this object.
См. также: toString()
public __toString ( ) : string
Результат string

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

If $name is passed this name will be associated with the address.
public addBcc ( string $address, string $name = null )
$address string
$name string optional

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

If $name is passed this name will be associated with the address.
public addBcc ( string $address, string $name = null ) : Swift_Mime_SimpleMessage
$address string
$name string optional
Результат Swift_Mime_SimpleMessage

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

If $name is passed this name will be associated with the address.
public addCc ( string $address, string $name = null )
$address string
$name string optional

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

If $name is passed this name will be associated with the address.
public addCc ( string $address, string $name = null ) : Swift_Mime_SimpleMessage
$address string
$name string optional
Результат Swift_Mime_SimpleMessage

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

If $name is passed this name will be associated with the address.
public addFrom ( string $address, string $name = null )
$address string
$name string optional

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

If $name is passed this name will be associated with the address.
public addFrom ( string $address, string $name = null ) : Swift_Mime_SimpleMessage
$address string
$name string optional
Результат Swift_Mime_SimpleMessage

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

If $name is passed this name will be associated with the address.
public addReplyTo ( string $address, string $name = null )
$address string
$name string optional

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

If $name is passed this name will be associated with the address.
public addReplyTo ( string $address, string $name = null ) : Swift_Mime_SimpleMessage
$address string
$name string optional
Результат Swift_Mime_SimpleMessage

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

If $name is passed this name will be associated with the address.
public addTo ( string $address, string $name = null )
$address string
$name string optional

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

If $name is passed this name will be associated with the address.
public addTo ( string $address, string $name = null ) : Swift_Mime_SimpleMessage
$address string
$name string optional
Результат Swift_Mime_SimpleMessage

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

Attach a {@link Swift_Mime_MimeEntity} such as an Attachment or MimePart.
public attach ( Swift_Mime_MimeEntity $entity )
$entity Swift_Mime_MimeEntity

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

Attach a {@link Swift_Mime_MimeEntity} such as an Attachment or MimePart.
public attach ( Swift_Mime_MimeEntity $entity ) : Swift_Mime_SimpleMessage
$entity Swift_Mime_MimeEntity
Результат Swift_Mime_SimpleMessage

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

Turn the body of this message into a child of itself if needed
protected becomeMimePart ( )

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

Remove an already attached entity.
public detach ( Swift_Mime_MimeEntity $entity )
$entity Swift_Mime_MimeEntity

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

Remove an already attached entity.
public detach ( Swift_Mime_MimeEntity $entity ) : Swift_Mime_SimpleMessage
$entity Swift_Mime_MimeEntity
Результат Swift_Mime_SimpleMessage

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

This method should be used when embedding images or other data in a message.
public embed ( Swift_Mime_MimeEntity $entity ) : string
$entity Swift_Mime_MimeEntity
Результат string

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

Get the Bcc addresses of this message.
public getBcc ( ) : array
Результат array

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

Get the Cc address of this message.
public getCc ( ) : array
Результат array

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

Get the date at which this message was created.
public getDate ( ) : DateTimeInterface
Результат DateTimeInterface

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

Get the from address of this message.
public getFrom ( ) : mixed
Результат mixed

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

См. также: Swift_Mime_SimpleMimeEntity::getIdField()
protected getIdField ( )

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

Always returns {@link LEVEL_TOP} for a message instance.
public getNestingLevel ( ) : integer
Результат integer

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

The returned value is an integer where 1 is the highest priority and 5 is the lowest.
public getPriority ( ) : integer
Результат integer

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

Get the addresses to which a read-receipt will be sent.
public getReadReceiptTo ( ) : string
Результат string

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

Get the reply-to address of this message.
public getReplyTo ( ) : string
Результат string

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

Get the return-path (bounce address) of this message.
public getReturnPath ( ) : string
Результат string

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

Get the sender of this message.
public getSender ( ) : string
Результат string

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

Get the subject of this message.
public getSubject ( ) : string
Результат string

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

Get the To addresses of this message.
public getTo ( ) : array
Результат array

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

If $name is passed and the first parameter is a string, this name will be associated with the address.
public setBcc ( mixed $addresses, string $name = null )
$addresses mixed
$name string optional

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

If $name is passed and the first parameter is a string, this name will be associated with the address.
public setBcc ( mixed $addresses, string $name = null ) : Swift_Mime_SimpleMessage
$addresses mixed
$name string optional
Результат Swift_Mime_SimpleMessage

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

If $name is passed and the first parameter is a string, this name will be associated with the address.
public setCc ( mixed $addresses, string $name = null )
$addresses mixed
$name string optional

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

If $name is passed and the first parameter is a string, this name will be associated with the address.
public setCc ( mixed $addresses, string $name = null ) : Swift_Mime_SimpleMessage
$addresses mixed
$name string optional
Результат Swift_Mime_SimpleMessage

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

Set the date at which this message was created.
public setDate ( DateTimeInterface $dateTime )
$dateTime DateTimeInterface

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

Set the date at which this message was created.
public setDate ( DateTimeInterface $dateTime ) : Swift_Mime_SimpleMessage
$dateTime DateTimeInterface
Результат Swift_Mime_SimpleMessage

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

You may pass an array of addresses if this message is from multiple people. If $name is passed and the first parameter is a string, this name will be associated with the address.
public setFrom ( string | array $addresses, string $name = null )
$addresses string | array
$name string optional

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

You may pass an array of addresses if this message is from multiple people. If $name is passed and the first parameter is a string, this name will be associated with the address.
public setFrom ( string | array $addresses, string $name = null ) : Swift_Mime_SimpleMessage
$addresses string | array
$name string optional
Результат Swift_Mime_SimpleMessage

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

The value is an integer where 1 is the highest priority and 5 is the lowest.
public setPriority ( integer $priority )
$priority integer

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

The value is an integer where 1 is the highest priority and 5 is the lowest.
public setPriority ( integer $priority ) : Swift_Mime_SimpleMessage
$priority integer
Результат Swift_Mime_SimpleMessage

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

Ask for a delivery receipt from the recipient to be sent to $addresses.
public setReadReceiptTo ( array $addresses )
$addresses array

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

Ask for a delivery receipt from the recipient to be sent to $addresses.
public setReadReceiptTo ( array $addresses ) : Swift_Mime_SimpleMessage
$addresses array
Результат Swift_Mime_SimpleMessage

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

You may pass an array of addresses if replies will go to multiple people. If $name is passed and the first parameter is a string, this name will be associated with the address.
public setReplyTo ( mixed $addresses, string $name = null )
$addresses mixed
$name string optional

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

You may pass an array of addresses if replies will go to multiple people. If $name is passed and the first parameter is a string, this name will be associated with the address.
public setReplyTo ( mixed $addresses, string $name = null ) : Swift_Mime_SimpleMessage
$addresses mixed
$name string optional
Результат Swift_Mime_SimpleMessage

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

Set the return-path (the bounce address) of this message.
public setReturnPath ( string $address )
$address string

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

Set the return-path (the bounce address) of this message.
public setReturnPath ( string $address ) : Swift_Mime_SimpleMessage
$address string
Результат Swift_Mime_SimpleMessage

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

This does not override the From field, but it has a higher significance.
public setSender ( string $address, string $name = null )
$address string
$name string optional

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

This does not override the From field, but it has a higher significance.
public setSender ( string $address, string $name = null ) : Swift_Mime_SimpleMessage
$address string
$name string optional
Результат Swift_Mime_SimpleMessage

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

Set the subject of this message.
public setSubject ( string $subject )
$subject string

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

Set the subject of this message.
public setSubject ( string $subject ) : Swift_Mime_SimpleMessage
$subject string
Результат Swift_Mime_SimpleMessage

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

If multiple recipients will receive the message an array should be used. Example: array('[email protected]', '[email protected]' => 'A name') If $name is passed and the first parameter is a string, this name will be associated with the address.
public setTo ( mixed $addresses, string $name = null )
$addresses mixed
$name string optional

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

If multiple recipients will receive the message an array should be used. Example: array('[email protected]', '[email protected]' => 'A name') If $name is passed and the first parameter is a string, this name will be associated with the address.
public setTo ( mixed $addresses, string $name = null ) : Swift_Mime_SimpleMessage
$addresses mixed
$name string optional
Результат Swift_Mime_SimpleMessage

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

Write this message to a {@link Swift_InputByteStream}.
public toByteStream ( Swift_InputByteStream $is )
$is Swift_InputByteStream

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

Get this message as a complete string.
public toString ( ) : string
Результат string