Class 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

  • version: $Id: Abstract.php 21635 2010-03-24 15:25:13Z yoshida@zend.co.jp $
  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Mail/Protocol/Smtp.php (line 48)

Zend_Mail_Protocol_Abstract
   |
   --Zend_Mail_Protocol_Smtp
Direct descendents
Class Description
 class Zend_Mail_Protocol_Smtp_Auth_Login Performs LOGIN authentication
 class Zend_Mail_Protocol_Smtp_Auth_Plain Performs PLAIN authentication
 class Zend_Mail_Protocol_Smtp_Auth_Crammd5 Performs CRAM-MD5 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 87)

Indicates an smtp AUTH has been issued and authenticated

  • access: protected
unknown_type $_data = null (line 111)

Indicates that DATA has been issued and sent

  • access: protected
unknown_type $_helo = false (line 79)

Indicates the HELO command has been issues

  • access: protected
unknown_type $_mail = false (line 95)

Indicates a MAIL command has been issued

  • access: protected
unknown_type $_rcpt = false (line 103)

Indicates one or more RCTP commands have been issued

  • access: protected
string $_secure (line 63)

Indicates that a session is requested to be secure

  • access: protected
boolean $_sess = false (line 71)

Indicates an smtp session has been started by the HELO command

  • access: protected
string $_transport = 'tcp' (line 55)

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 123)

Constructor.

  • throws: Zend_Mail_Protocol_Exception
  • 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:
auth (line 400)

Default authentication method

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

  • throws: Zend_Mail_Protocol_Exception
  • access: public
void auth ()

Redefined in descendants as:
connect (line 165)

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 301)

Issues DATA command

  • throws: Zend_Mail_Protocol_Exception
  • access: public
void data (string $data)
  • string $data
disconnect (line 417)

Closes connection

  • access: public
void disconnect ()
helo (line 178)

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

  • throws: Zend_Mail_Protocol_Exception
  • access: public
void helo ([string $host = '127.0.0.1'])
  • string $host: The client hostname or IP address (default: 127.0.0.1)
mail (line 250)

Issues MAIL command

  • throws: Zend_Mail_Protocol_Exception
  • access: public
void mail (string $from)
  • string $from: Sender mailbox
noop (line 355)

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 382)

Issues the QUIT command and clears the current session

  • access: public
void quit ()
rcpt (line 277)

Issues RCPT command

  • throws: Zend_Mail_Protocol_Exception
  • access: public
void rcpt (string $to)
  • string $to: Receiver(s) mailbox
rset (line 336)

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 370)

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 228)

Send EHLO or HELO depending on capabilities of smtp host

  • throws: Zend_Mail_Protocol_Exception
  • access: protected
void _ehlo (string $host)
  • string $host: The client hostname or IP address (default: 127.0.0.1)
_startSession (line 428)

Start mail session

  • access: protected
void _startSession ()
_stopSession (line 439)

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::_addLog()
 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

Documentation generated on Mon, 21 Jun 2010 15:45:22 -0400 by phpDocumentor 1.4.3