Class Smtp

Summary

Fully Qualified Name: Laminas\Mail\Transport\Smtp
Implements: TransportInterface

Description

SMTP connection object

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

Methods

Name Description Defined By
__construct() Constructor. Smtp
__destruct() Class destructor to ensure all open connections are closed Smtp
disconnect() Disconnect the connection protocol instance Smtp
getAutoDisconnect() Get the automatic disconnection value Smtp
getConnection() Gets the connection protocol instance Smtp
getEnvelope() Get envelope Smtp
getOptions() Get options Smtp
getPluginManager() Get plugin manager for loading SMTP protocol connection Smtp
plugin() Return an SMTP connection Smtp
send() Send an email via the SMTP connection protocol Smtp
setAutoDisconnect() Set the automatic disconnection when destruct Smtp
setConnection() Sets the connection protocol instance Smtp
setEnvelope() Set options Smtp
setOptions() Set options Smtp
setPluginManager() Set plugin manager for obtaining SMTP protocol connection Smtp

Method Details

__construct()

Constructor.

Parameter Name Type Description
$options \SmtpOptions Optional

Returns:

__destruct()

Class destructor to ensure all open connections are closed

Returns:

disconnect()

Disconnect the connection protocol instance

Returns: void

getAutoDisconnect()

Get the automatic disconnection value

Returns: bool

getConnection()

Gets the connection protocol instance

Returns: \Protocol\Smtp

getEnvelope()

Get envelope

Returns: \Envelope|null

getOptions()

Get options

Returns: \SmtpOptions

getPluginManager()

Get plugin manager for loading SMTP protocol connection

Returns: \Protocol\SmtpPluginManager

plugin()

Return an SMTP connection

Parameter Name Type Description
$name string
$options array|null

Returns: \Protocol\Smtp

send()

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.

Parameter Name Type Description
$message \Message

Returns:

setAutoDisconnect()

Set the automatic disconnection when destruct

Parameter Name Type Description
$flag bool

Returns: \Smtp

setConnection()

Sets the connection protocol instance

Parameter Name Type Description
$connection \Protocol\AbstractProtocol

Returns:

setEnvelope()

Set options

Parameter Name Type Description
$envelope \Envelope

Returns:

setOptions()

Set options

Parameter Name Type Description
$options \SmtpOptions

Returns: \Smtp

setPluginManager()

Set plugin manager for obtaining SMTP protocol connection

Parameter Name Type Description
$plugins \Protocol\SmtpPluginManager

Returns: \Smtp

Top