SMTPMailer
extends Mailer
in package
Class SMTPMailer.
Tags
Table of Contents
- $config : array<string|int, mixed>
- $debugCollector : EmailCollector
- $logs : array<string|int, mixed>
- $socket : false|resource
- __construct() : mixed
- Mailer constructor.
- __destruct() : mixed
- getCharset() : string
- getConfigs() : array<string, mixed>
- getCrlf() : string
- getLogs() : array<int, array<string, mixed>>
- Get an array of logs.
- resetLogs() : static
- Reset logs.
- send() : bool
- Send an Email Message.
- setDebugCollector() : static
- addLog() : static
- authenticate() : bool
- connect() : bool
- disconnect() : bool
- getConfig() : mixed
- getResponse() : string
- Get Mail Server response.
- makeConfig() : array<string, mixed>
- Make Base configurations.
- sendCommand() : int
- Send command to mail server.
- sendMessage() : int|false
- makeResponseCode() : int
Properties
$config
protected
array<string|int, mixed>
$config
= []
$debugCollector
protected
EmailCollector
$debugCollector
$logs
protected
array<string|int, mixed>
$logs
= []
$socket
protected
false|resource
$socket
= false
Methods
__construct()
Mailer constructor.
public
__construct(array<string, mixed>|string $username[, string|null $password = null ][, string $host = 'localhost' ][, int $port = 587 ][, string|null $hostname = null ]) : mixed
Parameters
- $username : array<string, mixed>|string
- $password : string|null = null
- $host : string = 'localhost'
- $port : int = 587
- $hostname : string|null = null
Return values
mixed —__destruct()
public
__destruct() : mixed
Return values
mixed —getCharset()
public
getCharset() : string
Return values
string —getConfigs()
public
getConfigs() : array<string, mixed>
Return values
array<string, mixed> —getCrlf()
public
getCrlf() : string
Return values
string —getLogs()
Get an array of logs.
public
getLogs() : array<int, array<string, mixed>>
Contains commands and responses from the Mailer server.
Return values
array<int, array<string, mixed>> —resetLogs()
Reset logs.
public
resetLogs() : static
Return values
static —send()
Send an Email Message.
public
send(Message $message) : bool
Parameters
- $message : Message
Return values
bool —setDebugCollector()
public
setDebugCollector(EmailCollector $collector) : static
Parameters
- $collector : EmailCollector
Return values
static —addLog()
protected
addLog(string $command, string $response) : static
Parameters
- $command : string
- $response : string
Return values
static —authenticate()
protected
authenticate() : bool
Tags
Return values
bool —connect()
protected
connect() : bool
Return values
bool —disconnect()
protected
disconnect() : bool
Return values
bool —getConfig()
protected
getConfig(string $key) : mixed
Parameters
- $key : string
Tags
Return values
mixed —getResponse()
Get Mail Server response.
protected
getResponse() : string
Return values
string —makeConfig()
Make Base configurations.
protected
makeConfig(array<string, mixed> $config) : array<string, mixed>
Parameters
- $config : array<string, mixed>
Return values
array<string, mixed> —sendCommand()
Send command to mail server.
protected
sendCommand(string $command) : int
Parameters
- $command : string
Return values
int —Response code
sendMessage()
protected
sendMessage(Message $message) : int|false
Parameters
- $message : Message
Return values
int|false —makeResponseCode()
private
makeResponseCode(string $response) : int
Parameters
- $response : string