Fully Qualified Name: | Laminas\Mail\Protocol\Smtp |
Extends: | AbstractProtocol |
SMTP implementation of Laminas\Mail\Protocol\AbstractProtocol
Minimum implementation according to RFC2821: EHLO, MAIL FROM, RCPT TO, DATA, RSET, NOOP, QUIT
Name | Description | Defined By |
---|---|---|
__construct() | Constructor. | Smtp |
__destruct() | Class destructor to cleanup open resources | AbstractProtocol |
auth() | Default authentication method | Smtp |
connect() | Connect to the server with the parameters given in the constructor. | Smtp |
data() | Issues DATA command | Smtp |
disconnect() | Closes connection | Smtp |
getLog() | Retrieve the transaction log | AbstractProtocol |
getMaximumLog() | Get the maximum log size | AbstractProtocol |
getRequest() | Retrieve the last client request | AbstractProtocol |
getResponse() | Retrieve the last server response | AbstractProtocol |
hasSession() | Returns the perceived session status | Smtp |
helo() | Initiate HELO/EHLO sequence and set flag to indicate valid smtp session | Smtp |
mail() | Issues MAIL command | Smtp |
noop() | Issues the NOOP command end validates answer | Smtp |
quit() | Issues the QUIT command and clears the current session | Smtp |
rcpt() | Issues RCPT command | Smtp |
resetLog() | Reset the transaction log | AbstractProtocol |
rset() | Issues the RSET command end validates answer | Smtp |
setMaximumLog() | Set the maximum log size | AbstractProtocol |
setUseCompleteQuit() | Set whether or not send QUIT command | Smtp |
useCompleteQuit() | Whether or not send QUIT command | Smtp |
vrfy() | Issues the VRFY command end validates answer | Smtp |
Constructor.
The first argument may be an array of all options. If so, it must include the 'host' and 'port' keys in order to ensure that all required values are present.
Parameter Name | Type | Description |
---|---|---|
$host | string|array | |
$port | null|int | |
$config | null|array |
Returns:
Class destructor to cleanup open resources
Returns:
Default authentication method
This default method is implemented by AUTH adapters to properly authenticate to a remote host.
Returns:
Connect to the server with the parameters given in the constructor.
Returns: bool
Issues DATA command
Parameter Name | Type | Description |
---|---|---|
$data | string |
Returns:
Closes connection
Returns:
Retrieve the transaction log
Returns: string
Get the maximum log size
Returns: int the maximum log size
Retrieve the last client request
Returns: string
Retrieve the last server response
Returns: array
Returns the perceived session status
Returns: bool
Initiate HELO/EHLO sequence and set flag to indicate valid smtp session
Parameter Name | Type | Description |
---|---|---|
$host | string | The |
Returns:
Issues MAIL command
Parameter Name | Type | Description |
---|---|---|
$from | string | Sender |
Returns:
Issues the NOOP command end validates answer
Not used by Laminas\Mail, could be used to keep a connection alive or check if it is still open.
Returns:
Issues the QUIT command and clears the current session
Returns:
Issues RCPT command
Parameter Name | Type | Description |
---|---|---|
$to | string | Receiver(s) |
Returns:
Reset the transaction log
Returns:
Issues the RSET command end validates answer
Can be used to restore a clean smtp communication state when a transaction has been cancelled or commencing a new transaction.
Returns:
Set the maximum log size
Parameter Name | Type | Description |
---|---|---|
$maximumLog | int | Maximum |
Returns:
Set whether or not send QUIT command
Parameter Name | Type | Description |
---|---|---|
$useCompleteQuit | bool | use |
Returns: bool
Whether or not send QUIT command
Returns: bool
Issues the VRFY command end validates answer
Not used by Laminas\Mail.
Parameter Name | Type | Description |
---|---|---|
$user | string | User |
Returns: