SendmailTransport
extends AbstractTransport
in package
SendmailTransport for sending mail through a Sendmail/Postfix (etc..) binary.
Supported modes are -bs and -t, with any additional flags desired. It is advised to use -bs mode since error reporting with -t mode is not possible.
Tags
Table of Contents
- $command : mixed
- $dispatcher : mixed
- $lastSent : mixed
- $logger : mixed
- $rate : mixed
- $stream : mixed
- $transport : mixed
- __construct() : mixed
- Constructor.
- __toString() : string
- send() : SentMessage|null
- setMaxPerSecond() : self
- Sets the maximum number of messages to send per second (0 to disable).
- doSend() : void
- getLogger() : LoggerInterface
- stringifyAddresses() : array<string|int, string>
- checkThrottling() : mixed
Properties
$command
private
mixed
$command
= '/usr/sbin/sendmail -bs'
$dispatcher
private
mixed
$dispatcher
$lastSent
private
mixed
$lastSent
= 0
$logger
private
mixed
$logger
$rate
private
mixed
$rate
= 0
$stream
private
mixed
$stream
$transport
private
mixed
$transport
Methods
__construct()
Constructor.
public
__construct([string $command = null ][, EventDispatcherInterface $dispatcher = null ][, LoggerInterface $logger = null ]) : mixed
If using -t mode you are strongly advised to include -oi or -i in the flags.
For example: /usr/sbin/sendmail -oi -t
-f
The recommended mode is "-bs" since it is interactive and failure notifications are hence possible.
Parameters
- $command : string = null
- $dispatcher : EventDispatcherInterface = null
- $logger : LoggerInterface = null
Return values
mixed —__toString()
public
__toString() : string
Return values
string —send()
public
send(RawMessage $message[, Envelope $envelope = null ]) : SentMessage|null
Parameters
- $message : RawMessage
- $envelope : Envelope = null
Return values
SentMessage|null —setMaxPerSecond()
Sets the maximum number of messages to send per second (0 to disable).
public
setMaxPerSecond(float $rate) : self
Parameters
- $rate : float
Return values
self —doSend()
protected
doSend(SentMessage $message) : void
Parameters
- $message : SentMessage
Return values
void —getLogger()
protected
getLogger() : LoggerInterface
Return values
LoggerInterface —stringifyAddresses()
protected
stringifyAddresses(array<string|int, Address> $addresses) : array<string|int, string>
Parameters
- $addresses : array<string|int, Address>
Return values
array<string|int, string> —checkThrottling()
private
checkThrottling() : mixed