Message
in package
Tags
Table of Contents
- $embeddedFiles : array<string|int, mixed>
- CIDs of files embedded in the message.
- $swift : Swift_Message
- The Swift Message instance.
- __call() : mixed
- Dynamically pass missing methods to the Swift instance.
- __construct() : void
- Create a new message instance.
- attach() : $this
- Attach a file to the message.
- attachData() : $this
- Attach in-memory data as an attachment.
- bcc() : $this
- Add a blind carbon copy to the message.
- cc() : $this
- Add a carbon copy to the message.
- embed() : string
- Embed a file in the message and get the CID.
- embedData() : string
- Embed in-memory data in the message and get the CID.
- from() : $this
- Add a "from" address to the message.
- getSwiftMessage() : Swift_Message
- Get the underlying Swift Message instance.
- priority() : $this
- Set the message priority level.
- replyTo() : $this
- Add a reply to address to the message.
- returnPath() : $this
- Set the "return path" of the message.
- sender() : $this
- Set the "sender" of the message.
- subject() : $this
- Set the subject of the message.
- to() : $this
- Add a recipient to the message.
- addAddresses() : $this
- Add a recipient to the message.
- createAttachmentFromData() : Swift_Attachment
- Create a Swift Attachment instance from data.
- createAttachmentFromPath() : Swift_Mime_Attachment
- Create a Swift Attachment instance.
- prepAttachment() : $this
- Prepare and attach the given attachment.
Properties
$embeddedFiles
CIDs of files embedded in the message.
protected
array<string|int, mixed>
$embeddedFiles
= []
$swift
The Swift Message instance.
protected
Swift_Message
$swift
Methods
__call()
Dynamically pass missing methods to the Swift instance.
public
__call(string $method, array<string|int, mixed> $parameters) : mixed
Parameters
- $method : string
- $parameters : array<string|int, mixed>
Return values
mixed —__construct()
Create a new message instance.
public
__construct(Swift_Message $swift) : void
Parameters
- $swift : Swift_Message
Return values
void —attach()
Attach a file to the message.
public
attach(string $file[, array<string|int, mixed> $options = [] ]) : $this
Parameters
- $file : string
- $options : array<string|int, mixed> = []
Return values
$this —attachData()
Attach in-memory data as an attachment.
public
attachData(string $data, string $name[, array<string|int, mixed> $options = [] ]) : $this
Parameters
- $data : string
- $name : string
- $options : array<string|int, mixed> = []
Return values
$this —bcc()
Add a blind carbon copy to the message.
public
bcc(string|array<string|int, mixed> $address[, string|null $name = null ][, bool $override = false ]) : $this
Parameters
- $address : string|array<string|int, mixed>
- $name : string|null = null
- $override : bool = false
Return values
$this —cc()
Add a carbon copy to the message.
public
cc(string|array<string|int, mixed> $address[, string|null $name = null ][, bool $override = false ]) : $this
Parameters
- $address : string|array<string|int, mixed>
- $name : string|null = null
- $override : bool = false
Return values
$this —embed()
Embed a file in the message and get the CID.
public
embed(string $file) : string
Parameters
- $file : string
Return values
string —embedData()
Embed in-memory data in the message and get the CID.
public
embedData(string $data, string $name[, string|null $contentType = null ]) : string
Parameters
- $data : string
- $name : string
- $contentType : string|null = null
Return values
string —from()
Add a "from" address to the message.
public
from(string|array<string|int, mixed> $address[, string|null $name = null ]) : $this
Parameters
- $address : string|array<string|int, mixed>
- $name : string|null = null
Return values
$this —getSwiftMessage()
Get the underlying Swift Message instance.
public
getSwiftMessage() : Swift_Message
Return values
Swift_Message —priority()
Set the message priority level.
public
priority(int $level) : $this
Parameters
- $level : int
Return values
$this —replyTo()
Add a reply to address to the message.
public
replyTo(string|array<string|int, mixed> $address[, string|null $name = null ]) : $this
Parameters
- $address : string|array<string|int, mixed>
- $name : string|null = null
Return values
$this —returnPath()
Set the "return path" of the message.
public
returnPath(string $address) : $this
Parameters
- $address : string
Return values
$this —sender()
Set the "sender" of the message.
public
sender(string|array<string|int, mixed> $address[, string|null $name = null ]) : $this
Parameters
- $address : string|array<string|int, mixed>
- $name : string|null = null
Return values
$this —subject()
Set the subject of the message.
public
subject(string $subject) : $this
Parameters
- $subject : string
Return values
$this —to()
Add a recipient to the message.
public
to(string|array<string|int, mixed> $address[, string|null $name = null ][, bool $override = false ]) : $this
Parameters
- $address : string|array<string|int, mixed>
- $name : string|null = null
- $override : bool = false
Return values
$this —addAddresses()
Add a recipient to the message.
protected
addAddresses(string|array<string|int, mixed> $address, string $name, string $type) : $this
Parameters
- $address : string|array<string|int, mixed>
- $name : string
- $type : string
Return values
$this —createAttachmentFromData()
Create a Swift Attachment instance from data.
protected
createAttachmentFromData(string $data, string $name) : Swift_Attachment
Parameters
- $data : string
- $name : string
Return values
Swift_Attachment —createAttachmentFromPath()
Create a Swift Attachment instance.
protected
createAttachmentFromPath(string $file) : Swift_Mime_Attachment
Parameters
- $file : string
Return values
Swift_Mime_Attachment —prepAttachment()
Prepare and attach the given attachment.
protected
prepAttachment(Swift_Attachment $attachment[, array<string|int, mixed> $options = [] ]) : $this
Parameters
- $attachment : Swift_Attachment
- $options : array<string|int, mixed> = []