Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Zend_Mail_Transport_Smtp Class Reference

Public Member Functions

 __construct ($host= '127.0.0.1', Array $config=array())
 Constructor.
 
 __destruct ()
 Class destructor to ensure all open connections are closed.
 
 setConnection (Zend_Mail_Protocol_Abstract $connection)
 Sets the connection protocol instance.
 
 getConnection ()
 Gets the connection protocol instance.
 
 _sendMail ()
 Send an email via the SMTP connection protocol.
 
- Public Member Functions inherited from Zend_Mail_Transport_Abstract
 send (Zend_Mail $mail)
 Send a mail using this transport.
 

Public Attributes

 $EOL = "\n"
 
- Public Attributes inherited from Zend_Mail_Transport_Abstract
 $body = ''
 
 $boundary = ''
 
 $header = ''
 
 $recipients = ''
 
 $EOL = "\r\n"
 

Protected Member Functions

 _prepareHeaders ($headers)
 Format and fix headers.
 
- Protected Member Functions inherited from Zend_Mail_Transport_Abstract
 _sendMail ()
 Send an email independent from the used transport.
 
 _getHeaders ($boundary)
 Return all mail headers as an array.
 
 _prepareHeaders ($headers)
 Prepare header string for use in transport.
 
 _buildBody ()
 Generate MIME compliant message from the current configuration.
 

Protected Attributes

 $_host
 
 $_port
 
 $_name = 'localhost'
 
 $_auth
 
 $_config
 
 $_connection
 
- Protected Attributes inherited from Zend_Mail_Transport_Abstract
 $_headers = array()
 
 $_isMultipart = false
 
 $_mail = false
 
 $_parts = array()
 

Additional Inherited Members

- Static Protected Member Functions inherited from Zend_Mail_Transport_Abstract
static _formatHeader (&$item, $key, $prefix)
 Prepend header name to header value.
 

Constructor & Destructor Documentation

__construct (   $host = '127.0.0.1',
Array  $config = array() 
)

Constructor.

Parameters
string$hostOPTIONAL (Default: 127.0.0.1)
array | null$configOPTIONAL (Default: null)
Returns
void
Todo:
Someone please make this compatible with the SendMail transport class.
__destruct ( )

Class destructor to ensure all open connections are closed.

Returns
void

Member Function Documentation

_prepareHeaders (   $headers)
protected

Format and fix headers.

Some SMTP servers do not strip BCC headers. Most clients do it themselves as do we.

protected

Parameters
array$headers
Returns
void
Exceptions
Zend_Transport_Exception
See Also
Zend_Mail_Transport_Exception
_sendMail ( )

Send an email via the SMTP connection protocol.

The connection via the protocol adapter is made just-in-time to allow a developer to add a custom adapter if required before mail is sent.

Returns
void
Todo:
Rename this to sendMail, it's a public method...
getConnection ( )

Gets the connection protocol instance.

Returns
Zend_Mail_Protocol|null
setConnection ( Zend_Mail_Protocol_Abstract  $connection)

Sets the connection protocol instance.

Parameters
Zend_Mail_Protocol_Abstract$client
Returns
void

Member Data Documentation

$_auth
protected
$_config
protected
$_connection
protected
$_host
protected
$_name = 'localhost'
protected
$_port
protected
$EOL = "\n"