API Documentation

Zend/Mail/Transport/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
Transport  
Version
$Id: Smtp.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Mail_Transport_Smtp

Package: Zend\Mail\Transport

SMTP connection object

Loads an instance of Zend_Mail_Protocol_Smtp and forwards smtp transactions

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

Properties

Propertypublicstring  $EOL= '"\n"'

EOL character string used by transport

Default value"\n"Details
Type
string
Access
public  
Propertyprotectedstring  $_auth= ''

Authentication type OPTIONAL

Details
Type
string
Propertyprotectedarray  $_config= ''

Config options for authentication

Details
Type
array
Propertyprotected\Zend_Mail_Protocol_Smtp  $_connection= ''

Instance of Zend_Mail_Protocol_Smtp

Propertyprotectedstring  $_host= ''

Remote smtp hostname or i.p.

Details
Type
string
Propertyprotectedstring  $_name= ''localhost''

Local client hostname or i.p.

Default value'localhost'Details
Type
string
Propertyprotectedinteger|null  $_port= ''

Port number

Details
Type
integernull

Methods

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

Constructor.

Parameters
Name Type Description
$host string

OPTIONAL (Default: 127.0.0.1)

$config array|null

OPTIONAL (Default: null)

Details
Todo
Someone please make this compatible with the SendMail transport class.  
methodpublic__destruct( ) : void

Class destructor to ensure all open connections are closed

methodprotected_prepareHeaders( array $headers ) : void

Format and fix headers

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

Parameters
Name Type Description
$headers array
Throws
Exception Description
\Zend_Transport_Exception
Details
Access
protected  
methodpublic_sendMail( ) : void

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.

Details
Todo
Rename this to sendMail, it's a public method...  
methodpublicgetConnection( ) : \Zend_Mail_Protocol|null

Gets the connection protocol instance

Returns
Type Description
\Zend_Mail_Protocol|null
methodpublicsetConnection(  $connection ) : void

Sets the connection protocol instance

Parameters
Name Type Description
$connection
Documentation was generated by DocBlox 0.15.1.