API Documentation

Zend/Mail/Protocol/Smtp.php

Show: inherited
Table of Contents

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.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Mail  
Subpackage
Protocol  
Version
$Id: Smtp.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Mail_Protocol_Smtp

Package: Zend\Mail\Protocol

Smtp implementation of Zend_Mail_Protocol_Abstract

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

Parent(s)
\Zend_Mail_Protocol_Abstract
Children
\Zend_Mail_Protocol_Smtp_Auth_Crammd5
\Zend_Mail_Protocol_Smtp_Auth_Plain
\Zend_Mail_Protocol_Smtp_Auth_Login
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotected\unknown_type  $_auth= 'false'

Indicates an smtp AUTH has been issued and authenticated

Default valuefalseDetails
Type
\unknown_type
Propertyprotected\unknown_type  $_data= 'null'

Indicates that DATA has been issued and sent

Default valuenullDetails
Type
\unknown_type
Propertyprotected\unknown_type  $_helo= 'false'

Indicates the HELO command has been issues

Default valuefalseDetails
Type
\unknown_type
Propertyprotected\unknown_type  $_mail= 'false'

Indicates a MAIL command has been issued

Default valuefalseDetails
Type
\unknown_type
Propertyprotected\unknown_type  $_rcpt= 'false'

Indicates one or more RCTP commands have been issued

Default valuefalseDetails
Type
\unknown_type
Propertyprotectedstring  $_secure= ''

Indicates that a session is requested to be secure

Details
Type
string
Propertyprotectedboolean  $_sess= 'false'

Indicates an smtp session has been started by the HELO command

Default valuefalseDetails
Type
boolean
Propertyprotectedstring  $_transport= ''tcp''

The transport method for the socket

Default value'tcp'Details
Type
string

Methods

methodpublic__construct( string $host = '127.0.0.1', integer $port = null, array $config = array() ) : void

Constructor.

Parameters
Name Type Description
$host string
$port integer
$config array
Throws
Exception Description
\Zend_Mail_Protocol_Exception
methodprotected_ehlo( string $host ) : void

Send EHLO or HELO depending on capabilities of smtp host

Parameters
Name Type Description
$host string

The client hostname or IP address (default: 127.0.0.1)

Throws
Exception Description
\Zend_Mail_Protocol_Exception
methodprotected_startSession( ) : void

Start mail session

methodprotected_stopSession( ) : void

Stop mail session

methodpublicauth( ) : void

Default authentication method

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

Throws
Exception Description
\Zend_Mail_Protocol_Exception
methodpublicconnect( ) : boolean

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

Returns
Type Description
boolean
methodpublicdata( string $data ) : void

Issues DATA command

Parameters
Name Type Description
$data string
Throws
Exception Description
\Zend_Mail_Protocol_Exception
methodpublicdisconnect( ) : void

Closes connection

methodpublichelo( string $host = '127.0.0.1' ) : void

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

Parameters
Name Type Description
$host string

The client hostname or IP address (default: 127.0.0.1)

Throws
Exception Description
\Zend_Mail_Protocol_Exception
methodpublicmail( string $from ) : void

Issues MAIL command

Parameters
Name Type Description
$from string

Sender mailbox

Throws
Exception Description
\Zend_Mail_Protocol_Exception
methodpublicnoop( ) : void

Issues the NOOP command and validates answer

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

methodpublicquit( ) : void

Issues the QUIT command and clears the current session

methodpublicrcpt( string $to ) : void

Issues RCPT command

Parameters
Name Type Description
$to string

Receiver(s) mailbox

Throws
Exception Description
\Zend_Mail_Protocol_Exception
methodpublicrset( ) : void

Issues the RSET command and validates answer

Can be used to restore a clean smtp communication state when a transaction has been cancelled or commencing a new transaction.

methodpublicvrfy( string $user ) : void

Issues the VRFY command and validates answer

Not used by Zend_Mail.

Parameters
Name Type Description
$user string

User Name or eMail to verify

Documentation was generated by DocBlox 0.15.1.