class Message mixin Email

Traits

Methods

mixed
forwardCallTo(mixed $object, string $method, array $parameters)

Forward a method call to the given object.

mixed
forwardDecoratedCallTo(mixed $object, string $method, array $parameters)

Forward a method call to the given object, returning $this if the forwarded call returned itself.

static never
throwBadMethodCallException(string $method)

Throw a bad method call exception for the given method.

__construct(Email $message)

Create a new message instance.

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

Add a "from" address to the message.

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

Set the "sender" of the message.

returnPath(string $address)

Set the "return path" of the message.

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

Add a recipient to the message.

forgetTo()

Remove all "to" addresses from the message.

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

Add a carbon copy to the message.

forgetCc()

Remove all carbon copy addresses from the message.

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

Add a blind carbon copy to the message.

forgetBcc()

Remove all of the blind carbon copy addresses from the message.

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

Add a "reply to" address to the message.

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

Add a recipient to the message.

addAddressDebugHeader(string $header, array $addresses)

Add an address debug header for a list of recipients.

subject(string $subject)

Set the subject of the message.

priority(int $level)

Set the message priority level.

attach(Attachable|Attachment|string $file, array $options = [])

Attach a file to the message.

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

Attach in-memory data as an attachment.

string
embed(Attachable|Attachment|string $file)

Embed a file in the message and get the CID.

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

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

Email
getSymfonyMessage()

Get the underlying Symfony Email instance.

__call(string $method, array $parameters)

Dynamically pass missing methods to the Symfony instance.

Details

in ForwardsCalls at line 22
protected mixed forwardCallTo(mixed $object, string $method, array $parameters)

Forward a method call to the given object.

Parameters

mixed $object
string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

in ForwardsCalls at line 52
protected mixed forwardDecoratedCallTo(mixed $object, string $method, array $parameters)

Forward a method call to the given object, returning $this if the forwarded call returned itself.

Parameters

mixed $object
string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

in ForwardsCalls at line 66
static protected never throwBadMethodCallException(string $method)

Throw a bad method call exception for the given method.

Parameters

string $method

Return Value

never

Exceptions

BadMethodCallException

at line 25
__construct(Email $message)

Create a new message instance.

Parameters

Email $message

at line 33
Message from(array|string $address, string|null $name = null)

Add a "from" address to the message.

Parameters

array|string $address
string|null $name

Return Value

Message

at line 45
Message sender(array|string $address, string|null $name = null)

Set the "sender" of the message.

Parameters

array|string $address
string|null $name

Return Value

Message

at line 57
Message returnPath(string $address)

Set the "return path" of the message.

Parameters

string $address

Return Value

Message

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

Add a recipient to the message.

Parameters

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

Return Value

Message

at line 83
Message forgetTo()

Remove all "to" addresses from the message.

Return Value

Message

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

Add a carbon copy to the message.

Parameters

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

Return Value

Message

at line 114
Message forgetCc()

Remove all carbon copy addresses from the message.

Return Value

Message

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

Add a blind carbon copy to the message.

Parameters

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

Return Value

Message

at line 145
Message forgetBcc()

Remove all of the blind carbon copy addresses from the message.

Return Value

Message

at line 160
Message replyTo(array|string $address, string|null $name = null)

Add a "reply to" address to the message.

Parameters

array|string $address
string|null $name

Return Value

Message

at line 168
protected Message addAddresses(array|string $address, string|null $name, string $type)

Add a recipient to the message.

Parameters

array|string $address
string|null $name
string $type

Return Value

Message

at line 202
protected Message addAddressDebugHeader(string $header, array $addresses)

Add an address debug header for a list of recipients.

Parameters

string $header
array $addresses

Return Value

Message

at line 215
Message subject(string $subject)

Set the subject of the message.

Parameters

string $subject

Return Value

Message

at line 225
Message priority(int $level)

Set the message priority level.

Parameters

int $level

Return Value

Message

at line 235
Message attach(Attachable|Attachment|string $file, array $options = [])

Attach a file to the message.

Parameters

Attachable|Attachment|string $file
array $options

Return Value

Message

at line 253
Message attachData(mixed $data, string $name, array $options = [])

Attach in-memory data as an attachment.

Parameters

mixed $data
string $name
array $options

Return Value

Message

at line 263
string embed(Attachable|Attachment|string $file)

Embed a file in the message and get the CID.

Parameters

Attachable|Attachment|string $file

Return Value

string

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

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

Parameters

mixed $data
string $name
string|null $contentType

Return Value

string

at line 312
Email getSymfonyMessage()

Get the underlying Symfony Email instance.

Return Value

Email

at line 320
__call(string $method, array $parameters)

Dynamically pass missing methods to the Symfony instance.

Parameters

string $method
array $parameters