Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Performs PLAIN authentication
Minimum implementation according to RFC2821: EHLO, MAIL FROM, RCPT TO, DATA, RSET, NOOP, QUIT

__construct(
string $host
=
127.0.0.1, int $port
=
null, array $config
=
null
)
:
void
Constructor.
Name | Type | Description |
---|---|---|
$host | string | (Default: 127.0.0.1) |
$port | int | (Default: null) |
$config | array | Auth-specific parameters |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |

__destruct(
)
:
void
Class destructor to cleanup open resources
Inherited from: \Zend_Mail_Protocol_Abstract::__destruct()
_addLog(
string $value
)
:
void
Add the transaction log
Inherited from: \Zend_Mail_Protocol_Abstract::_addLog()Name | Type | Description |
---|---|---|
$value | string | new transaction |

_connect(
string $remote
)
:
boolean
Connect to the server using the supplied transport and target
Inherited from: \Zend_Mail_Protocol_Abstract::_connect()An example $remote string may be 'tcp://mail.example.com:25' or 'ssh://hostname.com:2222'
Name | Type | Description |
---|---|---|
$remote | string | Remote |
Type | Description |
---|---|
boolean |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |

_disconnect(
)
:
void
Disconnect from remote host and free resource
Inherited from: \Zend_Mail_Protocol_Abstract::_disconnect()
_ehlo(
string $host
)
:
void
Send EHLO or HELO depending on capabilities of smtp host
Inherited from: \Zend_Mail_Protocol_Smtp::_ehlo()Name | Type | Description |
---|---|---|
$host | string | The client hostname or IP address (default: 127.0.0.1) |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |

_expect(
string|array $code, $timeout
=
null
)
:
string
Parse server response for successful codes
Inherited from: \Zend_Mail_Protocol_Abstract::_expect()Read the response from the stream and check for expected return code. Throws a Zend_Mail_Protocol_Exception if an unexpected code is returned.
Name | Type | Description |
---|---|---|
$code | string|array | One or more codes that indicate a successful response |
$timeout |
Type | Description |
---|---|
string | Last line of response string |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |

_receive(
$timeout
=
null
)
:
string
Get a line from the stream.
Inherited from: \Zend_Mail_Protocol_Abstract::_receive()Name | Type | Description |
---|---|---|
$timeout |
Type | Description |
---|---|
string |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |

_send(
string $request
)
:
integer|boolean
Send the given request followed by a LINEEND to the server.
Inherited from: \Zend_Mail_Protocol_Abstract::_send()Name | Type | Description |
---|---|---|
$request | string |
Type | Description |
---|---|
integerboolean | Number of bytes written to remote host |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |

_setStreamTimeout(
integer $timeout
)
:
boolean
Set stream timeout
Inherited from: \Zend_Mail_Protocol_Abstract::_setStreamTimeout()Name | Type | Description |
---|---|---|
$timeout | integer |
Type | Description |
---|---|
boolean |

_startSession(
)
:
void
Start mail session
Inherited from: \Zend_Mail_Protocol_Smtp::_startSession()
auth(
)
:
void
Perform PLAIN authentication with supplied credentials
This default method is implemented by AUTH adapters to properly authenticate to a remote host.
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |

connect(
)
:
boolean
Connect to the server with the parameters given in the constructor.
Inherited from: \Zend_Mail_Protocol_Smtp::connect()Concrete adapters for this class will implement their own unique connect scripts, using the _connect() method to create the socket resource.
Type | Description |
---|---|
boolean |

data(
string $data
)
:
void
Issues DATA command
Inherited from: \Zend_Mail_Protocol_Smtp::data()Name | Type | Description |
---|---|---|
$data | string |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |

getLog(
)
:
string
Retrieve the transaction log
Inherited from: \Zend_Mail_Protocol_Abstract::getLog()Type | Description |
---|---|
string |

getMaximumLog(
)
:
int
Get the maximum log size
Inherited from: \Zend_Mail_Protocol_Abstract::getMaximumLog()Type | Description |
---|---|
int | the maximum log size |

getRequest(
)
:
string
Retrieve the last client request
Inherited from: \Zend_Mail_Protocol_Abstract::getRequest()Type | Description |
---|---|
string |

getResponse(
)
:
array
Retrieve the last server response
Inherited from: \Zend_Mail_Protocol_Abstract::getResponse()Type | Description |
---|---|
array |

helo(
string $host
=
127.0.0.1
)
:
void
Initiate HELO/EHLO sequence and set flag to indicate valid smtp session
Inherited from: \Zend_Mail_Protocol_Smtp::helo()Name | Type | Description |
---|---|---|
$host | string | The client hostname or IP address (default: 127.0.0.1) |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |

mail(
string $from
)
:
void
Issues MAIL command
Inherited from: \Zend_Mail_Protocol_Smtp::mail()Name | Type | Description |
---|---|---|
$from | string | Sender mailbox |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |

noop(
)
:
void
Issues the NOOP command and validates answer
Inherited from: \Zend_Mail_Protocol_Smtp::noop()Not used by Zend_Mail, could be used to keep a connection alive or check if it is still open.

quit(
)
:
void
Issues the QUIT command and clears the current session
Inherited from: \Zend_Mail_Protocol_Smtp::quit()
rcpt(
string $to
)
:
void
Issues RCPT command
Inherited from: \Zend_Mail_Protocol_Smtp::rcpt()Name | Type | Description |
---|---|---|
$to | string | Receiver(s) mailbox |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |

resetLog(
)
:
void
Reset the transaction log
Inherited from: \Zend_Mail_Protocol_Abstract::resetLog()
rset(
)
:
void
Issues the RSET command and validates answer
Inherited from: \Zend_Mail_Protocol_Smtp::rset()Can be used to restore a clean smtp communication state when a transaction has been cancelled or commencing a new transaction.

setMaximumLog(
integer $maximumLog
)
:
void
Set the maximum log size
Inherited from: \Zend_Mail_Protocol_Abstract::setMaximumLog()Name | Type | Description |
---|---|---|
$maximumLog | integer | Maximum log size |

vrfy(
string $user
)
:
void
Issues the VRFY command and validates answer
Inherited from: \Zend_Mail_Protocol_Smtp::vrfy()Not used by Zend_Mail.
Name | Type | Description |
---|---|---|
$user | string | User Name or eMail to verify |