class Message mixin Swift_Message

Properties

protected Swift_Message $swift

The Swift Message instance.

protected array $embeddedFiles

CIDs of files embedded in the message.

Methods

void
__construct(Swift_Message $swift)

Create a new message instance.

$this
from(string|array $address, string|null $name = null)

Add a "from" address to the message.

$this
sender(string|array $address, string|null $name = null)

Set the "sender" of the message.

$this
returnPath(string $address)

Set the "return path" of the message.

$this
to(string|array $address, string|null $name = null, bool $override = false)

Add a recipient to the message.

$this
cc(string|array $address, string|null $name = null, bool $override = false)

Add a carbon copy to the message.

$this
bcc(string|array $address, string|null $name = null, bool $override = false)

Add a blind carbon copy to the message.

$this
replyTo(string|array $address, string|null $name = null)

Add a reply to address to the message.

$this
addAddresses(string|array $address, string $name, string $type)

Add a recipient to the message.

$this
subject(string $subject)

Set the subject of the message.

$this
priority(int $level)

Set the message priority level.

$this
attach(string $file, array $options = [])

Attach a file to the message.

Swift_Attachment
createAttachmentFromPath(string $file)

Create a Swift Attachment instance.

$this
attachData(string $data, string $name, array $options = [])

Attach in-memory data as an attachment.

Swift_Attachment
createAttachmentFromData(string $data, string $name)

Create a Swift Attachment instance from data.

string
embed(string $file)

Embed a file in the message and get the CID.

string
embedData(string $data, string $name, string|null $contentType = null)

Embed in-memory data in the message and get the CID.

$this
prepAttachment(Swift_Attachment $attachment, array $options = [])

Prepare and attach the given attachment.

Swift_Message
getSwiftMessage()

Get the underlying Swift Message instance.

mixed
__call(string $method, array $parameters)

Dynamically pass missing methods to the Swift instance.

Details

at line 33
void __construct(Swift_Message $swift)

Create a new message instance.

Parameters

Swift_Message $swift

Return Value

void

at line 45
$this from(string|array $address, string|null $name = null)

Add a "from" address to the message.

Parameters

string|array $address
string|null $name

Return Value

$this

at line 59
$this sender(string|array $address, string|null $name = null)

Set the "sender" of the message.

Parameters

string|array $address
string|null $name

Return Value

$this

at line 72
$this returnPath(string $address)

Set the "return path" of the message.

Parameters

string $address

Return Value

$this

at line 87
$this to(string|array $address, string|null $name = null, bool $override = false)

Add a recipient to the message.

Parameters

string|array $address
string|null $name
bool $override

Return Value

$this

at line 106
$this cc(string|array $address, string|null $name = null, bool $override = false)

Add a carbon copy to the message.

Parameters

string|array $address
string|null $name
bool $override

Return Value

$this

at line 125
$this bcc(string|array $address, string|null $name = null, bool $override = false)

Add a blind carbon copy to the message.

Parameters

string|array $address
string|null $name
bool $override

Return Value

$this

at line 143
$this replyTo(string|array $address, string|null $name = null)

Add a reply to address to the message.

Parameters

string|array $address
string|null $name

Return Value

$this

at line 156
protected $this addAddresses(string|array $address, string $name, string $type)

Add a recipient to the message.

Parameters

string|array $address
string $name
string $type

Return Value

$this

at line 173
$this subject(string $subject)

Set the subject of the message.

Parameters

string $subject

Return Value

$this

at line 186
$this priority(int $level)

Set the message priority level.

Parameters

int $level

Return Value

$this

at line 200
$this attach(string $file, array $options = [])

Attach a file to the message.

Parameters

string $file
array $options

Return Value

$this

at line 213
protected Swift_Attachment createAttachmentFromPath(string $file)

Create a Swift Attachment instance.

Parameters

string $file

Return Value

Swift_Attachment

at line 226
$this attachData(string $data, string $name, array $options = [])

Attach in-memory data as an attachment.

Parameters

string $data
string $name
array $options

Return Value

$this

at line 240
protected Swift_Attachment createAttachmentFromData(string $data, string $name)

Create a Swift Attachment instance from data.

Parameters

string $data
string $name

Return Value

Swift_Attachment

at line 251
string embed(string $file)

Embed a file in the message and get the CID.

Parameters

string $file

Return Value

string

at line 270
string embedData(string $data, string $name, string|null $contentType = null)

Embed in-memory data in the message and get the CID.

Parameters

string $data
string $name
string|null $contentType

Return Value

string

at line 284
protected $this prepAttachment(Swift_Attachment $attachment, array $options = [])

Prepare and attach the given attachment.

Parameters

Swift_Attachment $attachment
array $options

Return Value

$this

at line 310
Swift_Message getSwiftMessage()

Get the underlying Swift Message instance.

Return Value

Swift_Message

at line 322
mixed __call(string $method, array $parameters)

Dynamically pass missing methods to the Swift instance.

Parameters

string $method
array $parameters

Return Value

mixed