PHP Класс Jyxo\Mail\Sender\Smtp

Works in combination with \Jyxo\Mail\Sender.
Автор: Jaroslav Hanslík
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( string $host = 'localhost', integer $port = 25, string $helo = 'localhost', integer $timeout = 5 ) Creates an instance.
__destruct ( ) Destroys an instance and disconnects from the server.
auth ( string $user, string $password ) : self Connects to the server using a username and password.
connect ( ) : self Connects to the SMTP server.
data ( string $header, string $body ) : self Sends email headers and body.
disconnect ( ) : self Disconnects from server.
from ( string $from ) : self Sets the sender.
recipient ( string $recipient ) : self Adds a recipient.
reset ( ) : self Resets previous commands.

Приватные методы

Метод Описание
commandData ( ) Sends the DATA command.
commandHelo ( ) Sends the EHLO/HELO command.
commandMailFrom ( string $from ) Sends the MAIL FROM command.
commandRcptTo ( string $recipient ) Sends the RCPT TO command.
commandRset ( ) Sends the RSET command.
readData ( ) : string Reads data from the server.
writeData ( string $data ) Sends data to the server.

Описание методов

__construct() публичный Метод

Creates an instance.
public __construct ( string $host = 'localhost', integer $port = 25, string $helo = 'localhost', integer $timeout = 5 )
$host string Server hostname
$port integer Server port
$helo string HELO value
$timeout integer Connection timeout

__destruct() публичный Метод

Destroys an instance and disconnects from the server.
public __destruct ( )

auth() публичный Метод

Connects to the server using a username and password.
public auth ( string $user, string $password ) : self
$user string Username
$password string Password
Результат self

connect() публичный Метод

Connects to the SMTP server.
public connect ( ) : self
Результат self

data() публичный Метод

Sends email headers and body.
public data ( string $header, string $body ) : self
$header string Headers
$body string Body
Результат self

disconnect() публичный Метод

Disconnects from server.
public disconnect ( ) : self
Результат self

from() публичный Метод

Sets the sender.
public from ( string $from ) : self
$from string Sender
Результат self

recipient() публичный Метод

Adds a recipient.
public recipient ( string $recipient ) : self
$recipient string Recipient
Результат self

reset() публичный Метод

Resets previous commands.
public reset ( ) : self
Результат self