class SmtpMailer implements IMailer

Sends emails via the SMTP server.

Traits

Strict class for better experience.

Methods

__construct(array $options = [])

No description

void
send(Message $mail)

Sends email.

void
connect()

Connects and authenticates to SMTP server.

void
disconnect()

Disconnects from SMTP server.

void
write(string $line, $expectedCode = null, string $message = null)

Writes data to server and checks response against expected code if some provided.

string
read()

Reads response from server.

Details

at line 53
__construct(array $options = [])

Parameters

array $options

at line 85
void send(Message $mail)

Sends email.

Parameters

Message $mail

Return Value

void

Exceptions

SmtpException

at line 132
protected void connect()

Connects and authenticates to SMTP server.

Return Value

void

at line 183
protected void disconnect()

Disconnects from SMTP server.

Return Value

void

at line 194
protected void write(string $line, $expectedCode = null, string $message = null)

Writes data to server and checks response against expected code if some provided.

Parameters

string $line
$expectedCode
string $message

Return Value

void

at line 209
protected string read()

Reads response from server.

Return Value

string