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