Message
in package
Table of Contents
Properties
- $embeddedFiles : array<string|int, mixed>
- CIDs of files embedded in the message.
- $swift : Swift_Message
- The Swift Message instance.
Methods
- __construct() : mixed
- 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
__construct()
Create a new message instance.
public
__construct(Swift_Message $swift) : mixed
Parameters
- $swift : Swift_Message
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
$thisattachData()
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
$thisbcc()
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
$thiscc()
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
$thisembed()
Embed a file in the message and get the CID.
public
embed(string $file) : string
Parameters
- $file : string
Return values
stringembedData()
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
stringfrom()
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
$thisgetSwiftMessage()
Get the underlying Swift Message instance.
public
getSwiftMessage() : Swift_Message
Return values
Swift_Messagepriority()
Set the message priority level.
public
priority(int $level) : $this
Parameters
- $level : int
Return values
$thisreplyTo()
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
$thisreturnPath()
Set the "return path" of the message.
public
returnPath(string $address) : $this
Parameters
- $address : string
Return values
$thissender()
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
$thissubject()
Set the subject of the message.
public
subject(string $subject) : $this
Parameters
- $subject : string
Return values
$thisto()
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
$thisaddAddresses()
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
$thiscreateAttachmentFromData()
Create a Swift Attachment instance from data.
protected
createAttachmentFromData(string $data, string $name) : Swift_Attachment
Parameters
- $data : string
- $name : string
Return values
Swift_AttachmentcreateAttachmentFromPath()
Create a Swift Attachment instance.
protected
createAttachmentFromPath(string $file) : Swift_Mime_Attachment
Parameters
- $file : string
Return values
Swift_Mime_AttachmentprepAttachment()
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> = []