Mailer
in package
Mailer class
Tags
Table of Contents
Properties
- $defaultFrom : string|null
- Default from address
- $transport : TransportInterface|null
- Transport object
Methods
- __construct() : mixed
- Constructor
- getDefaultFrom() : string|null
- Get default from address
- hasDefaultFrom() : bool
- Has default from address
- send() : mixed
- Send message
- sendFromDir() : int
- Send messages from email messages saved to disk in a directory
- sendFromQueue() : int
- Send messages from mail queue
- setDefaultFrom() : Mailer
- Set default from address
- transport() : TransportInterface
- Get the transport object
Properties
$defaultFrom
Default from address
protected
string|null
$defaultFrom
= null
$transport
Transport object
protected
TransportInterface|null
$transport
= null
Methods
__construct()
Constructor
public
__construct(TransportInterface $transport[, string|null $defaultFrom = null ]) : mixed
Instantiate the message object
Parameters
- $transport : TransportInterface
- $defaultFrom : string|null = null
getDefaultFrom()
Get default from address
public
getDefaultFrom() : string|null
Return values
string|nullhasDefaultFrom()
Has default from address
public
hasDefaultFrom() : bool
Return values
boolsend()
Send message
public
send(Message $message) : mixed
Parameters
- $message : Message
sendFromDir()
Send messages from email messages saved to disk in a directory
public
sendFromDir(string $dir) : int
Parameters
- $dir : string
Tags
Return values
intsendFromQueue()
Send messages from mail queue
public
sendFromQueue(Queue $queue) : int
Parameters
- $queue : Queue
Return values
intsetDefaultFrom()
Set default from address
public
setDefaultFrom(string $from) : Mailer
Parameters
- $from : string
Return values
Mailertransport()
Get the transport object
public
transport() : TransportInterface