SMTP connection object

Loads an instance of Zend\Mail\Protocol\Smtp and forwards smtp transactions

category Zend
package Zend_Mail
subpackage Transport

 Methods

Constructor.

__construct(\Zend\Mail\Transport\SmtpOptions $options) 

Parameters

Class destructor to ensure all open connections are closed

__destruct() 

Disconnect the connection protocol instance

disconnect() : void

Get the automatic disconnection value

getAutoDisconnect() : bool

Returns

bool

Gets the connection protocol instance

getConnection() : \Zend\Mail\Protocol\Smtp

Get plugin manager for loading SMTP protocol connection

getPluginManager() : \Zend\Mail\Protocol\SmtpPluginManager

Return an SMTP connection

plugin(string $name, array $options) : \Zend\Mail\Protocol\Smtp

Parameters

$name

string

$options

arraynull

Returns

Send an email via the SMTP connection protocol

send(\Zend\Mail\Message $message) : 

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.

Parameters

Exceptions

\Zend\Mail\Transport\Exception\RuntimeException

Returns

Set the automatic disconnection when destruct

setAutoDisconnect(bool $flag) : \Zend\Mail\Transport\Smtp

Parameters

$flag

bool

Returns

Sets the connection protocol instance

setConnection(\Zend\Mail\Protocol\AbstractProtocol $connection) 

Parameters

Set options

setOptions(\Zend\Mail\Transport\SmtpOptions $options) : \Zend\Mail\Transport\Smtp

Set plugin manager for obtaining SMTP protocol connection

setPluginManager(\Zend\Mail\Protocol\SmtpPluginManager $plugins) : \Zend\Mail\Transport\Smtp

Lazy load the connection, and pass it helo

lazyLoadConnection() : \Zend\Mail\Protocol\Smtp

Prepare body string from message

prepareBody(\Zend\Mail\Message $message) : string

Parameters

Returns

string

Retrieve email address for envelope FROM

prepareFromAddress(\Zend\Mail\Message $message) : string

Parameters

Exceptions

\Zend\Mail\Transport\Exception\RuntimeException

Returns

string

Prepare header string from message

prepareHeaders(\Zend\Mail\Message $message) : string

Parameters

Returns

string

Prepare array of email address recipients

prepareRecipients(\Zend\Mail\Message $message) : array

Parameters

Returns

array

 Properties

 

$autoDisconnect

$autoDisconnect : bool

 

$connection

$connection : \Zend\Mail\Protocol\Smtp

 

$options

$options : \Zend\Mail\Transport\SmtpOptions