## Zend_Mail_Protocol_Smtp

Description

Smtp implementation of Zend_Mail_Protocol_Abstract

Minimum implementation according to RFC2821: EHLO, MAIL FROM, RCPT TO, DATA, RSET, NOOP, QUIT

- license: New BSD License
- copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
- throws: Zend_Mail_Protocol_Exception

Located in /Zend/Mail/Protocol/Smtp.php (line 43)

    Zend_Mail_Protocol_Abstract
       |
       --Zend_Mail_Protocol_Smtp

Direct descendents

Class | Description
--- | ---
Zend_Mail_Protocol_Smtp_Auth_Crammd5 | Performs CRAM-MD5 authentication
Zend_Mail_Protocol_Smtp_Auth_Login | Performs LOGIN authentication
Zend_Mail_Protocol_Smtp_Auth_Plain | Performs PLAIN authentication

Variable Summary
unknown_type $_auth
unknown_type $_data
unknown_type $_helo
unknown_type $_mail
unknown_type $_rcpt
string $_secure
boolean $_sess
string $_transport
Method Summary
void __construct ([string $host = '127.0.0.1'], [integer $port = null], [ $config = array()])
void auth ()
boolean connect ()
void data (string $data)
void disconnect ()
void helo ([string $host = '127.0.0.1'])
void mail (string $from)
void noop ()
void quit ()
void rcpt (string $to)
void rset ()
void vrfy (string $user)
void _ehlo (string $host)
void _startSession ()
void _stopSession ()
Variables
unknown_type $_auth = false (line 82)

Indicates an smtp AUTH has been issued and authenticated

- access: protected

unknown_type $_data = null (line 106)

Indicates that DATA has been issued and sent

- access: protected

unknown_type $_helo = false (line 74)

Indicates the HELO command has been issues

- access: protected

unknown_type $_mail = false (line 90)

Indicates a MAIL command has been issued

- access: protected

unknown_type $_rcpt = false (line 98)

Indicates one or more RCTP commands have been issued

- access: protected

string $_secure (line 58)

Indicates that a session is requested to be secure

- access: protected

boolean $_sess = false (line 66)

Indicates an smtp session has been started by the HELO command

- access: protected

string $_transport = 'tcp' (line 50)

The transport method for the socket

- access: protected

#### Inherited Variables

Inherited from Zend_Mail_Protocol_Abstract

> Zend_Mail_Protocol_Abstract::$_host
> Zend_Mail_Protocol_Abstract::$_port
> Zend_Mail_Protocol_Abstract::$_request
> Zend_Mail_Protocol_Abstract::$_response
> Zend_Mail_Protocol_Abstract::$_socket
> Zend_Mail_Protocol_Abstract::$_template
> Zend_Mail_Protocol_Abstract::$_validHost

Methods
Constructor __construct (line 117)

Constructor.

- access: public

void __construct ([string $host = '127.0.0.1'], [integer $port = null], [ $config = array()])

- string $host
- integer $port
- array $config

Redefinition of:

Zend_Mail_Protocol_Abstract::__construct()
  Constructor.

Redefined in descendants as:

- Zend_Mail_Protocol_Smtp_Auth_Crammd5::__construct() : Constructor.
- Zend_Mail_Protocol_Smtp_Auth_Login::__construct() : Constructor.
- Zend_Mail_Protocol_Smtp_Auth_Plain::__construct() : Constructor.

auth (line 372)

Default authentication method

This default method is implemented by AUTH adapters to properly authenticate to a remote host.

- access: public
- throws: Zend_Mail_Protocol_Exception

void auth ()

Redefined in descendants as:

- Zend_Mail_Protocol_Smtp_Auth_Crammd5::auth()
- Zend_Mail_Protocol_Smtp_Auth_Login::auth() : Perform LOGIN authentication with supplied credentials
- Zend_Mail_Protocol_Smtp_Auth_Plain::auth() : Perform PLAIN authentication with supplied credentials

connect (line 156)

Connect to the server with the parameters given in the constructor.

- access: public

boolean connect ()

Redefinition of:

Zend_Mail_Protocol_Abstract::connect()
  Create a connection to the remote host

data (line 277)

Issues DATA command

- access: public
- throws: Zend_Mail_Protocol_Exception

void data (string $data)

- string $data

disconnect (line 386)

Closes connection

- access: public

void disconnect ()
helo (line 169)

Initiate HELO/EHLO sequence and set flag to indicate valid smtp session

- access: public
- throws: Zend_Mail_Protocol_Exception

void helo ([string $host = '127.0.0.1'])

- string $host: The client hostname or IP address (default: 127.0.0.1)

mail (line 232)

Issues MAIL command

- access: public
- throws: Zend_Mail_Protocol_Exception

void mail (string $from)

- string $from: Sender mailbox

noop (line 327)

Issues the NOOP command end validates answer

Not used by Zend_Mail, could be used to keep a connection alive or check if it is still open.

- access: public

void noop ()
quit (line 354)

Issues the QUIT command and clears the current session

- access: public

void quit ()
rcpt (line 256)

Issues RCPT command

- access: public
- throws: Zend_Mail_Protocol_Exception

void rcpt (string $to)

- string $to: Receiver(s) mailbox

rset (line 309)

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.

- access: public

void rset ()
vrfy (line 342)

Issues the VRFY command end validates answer

Not used by Zend_Mail.

- access: public

void vrfy (string $user)

- string $user: User Name or eMail to verify

_ehlo (line 210)

Send EHLO or HELO depending on capabilities of smtp host

- access: protected
- throws: Zend_Mail_Protocol_Exception

void _ehlo (string $host)

- string $host: The client hostname or IP address (default: 127.0.0.1)

_startSession (line 397)

Start mail session

- access: protected

void _startSession ()
_stopSession (line 408)

Stop mail session

- access: protected

void _stopSession ()

#### Inherited Methods

Inherited From Zend_Mail_Protocol_Abstract

> Zend_Mail_Protocol_Abstract::__construct()
> Zend_Mail_Protocol_Abstract::connect()
> Zend_Mail_Protocol_Abstract::getLog()
> Zend_Mail_Protocol_Abstract::getRequest()
> Zend_Mail_Protocol_Abstract::getResponse()
> Zend_Mail_Protocol_Abstract::resetLog()
> Zend_Mail_Protocol_Abstract::_connect()
> Zend_Mail_Protocol_Abstract::_disconnect()
> Zend_Mail_Protocol_Abstract::_expect()
> Zend_Mail_Protocol_Abstract::_receive()
> Zend_Mail_Protocol_Abstract::_send()
> Zend_Mail_Protocol_Abstract::__destruct()

Class Constants

#### Inherited Constants

Inherited from Zend_Mail_Protocol_Abstract

> Zend_Mail_Protocol_Abstract::EOL
> Zend_Mail_Protocol_Abstract::TIMEOUT_CONNECTION

Documentation generated on Wed, 21 Feb 2007 11:59:55 -0800 by phpDocumentor 1.3.1