Message
class Message (View source)
Properties
protected Swift_Message | $swift | The Swift Message instance. |
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
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.
protected $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.
protected 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.
protected 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.
protected $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.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Mail/Message.html