Swift_Plugins_PopBeforeSmtpPlugin
in package
implements
Swift_Events_TransportChangeListener, Swift_Plugins_Pop_Pop3Connection
Makes sure a connection to a POP3 host has been established prior to connecting to SMTP.
Tags
Interfaces, Classes and Traits
- Swift_Events_TransportChangeListener
- Listens for changes within the Transport system.
- Swift_Plugins_Pop_Pop3Connection
- Pop3Connection interface for connecting and disconnecting to a POP3 host.
Table of Contents
- $connection : mixed
- A delegate connection to use (mostly a test hook)
- $crypto : mixed
- Encryption type to use (if any)
- $host : mixed
- Hostname of the POP3 server
- $password : mixed
- Password to use (if any)
- $port : mixed
- Port number to connect on
- $socket : mixed
- Established connection via TCP socket
- $timeout : mixed
- Connect timeout in seconds
- $transport : mixed
- SMTP Transport to bind to
- $username : mixed
- Username to use (if any)
- __construct() : mixed
- Create a new PopBeforeSmtpPlugin for $host and $port.
- beforeTransportStarted() : mixed
- Invoked just before a Transport is started.
- beforeTransportStopped() : mixed
- Not used.
- bindSmtp() : mixed
- Bind this plugin to a specific SMTP transport instance.
- connect() : mixed
- Connect to the POP3 host and authenticate.
- disconnect() : mixed
- Disconnect from the POP3 host.
- setConnection() : $this
- Set a Pop3Connection to delegate to instead of connecting directly.
- setPassword() : $this
- Set the password to use when connecting (if needed).
- setTimeout() : $this
- Set the connection timeout in seconds (default 10).
- setUsername() : $this
- Set the username to use when connecting (if needed).
- transportStarted() : mixed
- Not used.
- transportStopped() : mixed
- Not used.
- assertOk() : mixed
- command() : mixed
- getHostString() : mixed
Properties
$connection
A delegate connection to use (mostly a test hook)
private
mixed
$connection
$crypto
Encryption type to use (if any)
private
mixed
$crypto
$host
Hostname of the POP3 server
private
mixed
$host
$password
Password to use (if any)
private
mixed
$password
$port
Port number to connect on
private
mixed
$port
$socket
Established connection via TCP socket
private
mixed
$socket
$timeout
Connect timeout in seconds
private
mixed
$timeout
= 10
$transport
SMTP Transport to bind to
private
mixed
$transport
$username
Username to use (if any)
private
mixed
$username
Methods
__construct()
Create a new PopBeforeSmtpPlugin for $host and $port.
public
__construct(string $host[, int $port = 110 ][, string $crypto = null ]) : mixed
Parameters
- $host : string
-
Hostname or IP. Literal IPv6 addresses should be wrapped in square brackets.
- $port : int = 110
- $crypto : string = null
-
as "tls" or "ssl"
Return values
mixed —beforeTransportStarted()
Invoked just before a Transport is started.
public
beforeTransportStarted(Swift_Events_TransportChangeEvent $evt) : mixed
Parameters
Return values
mixed —beforeTransportStopped()
Not used.
public
beforeTransportStopped(Swift_Events_TransportChangeEvent $evt) : mixed
Parameters
Return values
mixed —bindSmtp()
Bind this plugin to a specific SMTP transport instance.
public
bindSmtp(Swift_Transport $smtp) : mixed
Parameters
- $smtp : Swift_Transport
Return values
mixed —connect()
Connect to the POP3 host and authenticate.
public
connect() : mixed
Tags
Return values
mixed —disconnect()
Disconnect from the POP3 host.
public
disconnect() : mixed
Return values
mixed —setConnection()
Set a Pop3Connection to delegate to instead of connecting directly.
public
setConnection(Swift_Plugins_Pop_Pop3Connection $connection) : $this
Parameters
- $connection : Swift_Plugins_Pop_Pop3Connection
Return values
$this —setPassword()
Set the password to use when connecting (if needed).
public
setPassword(string $password) : $this
Parameters
- $password : string
Return values
$this —setTimeout()
Set the connection timeout in seconds (default 10).
public
setTimeout(int $timeout) : $this
Parameters
- $timeout : int
Return values
$this —setUsername()
Set the username to use when connecting (if needed).
public
setUsername(string $username) : $this
Parameters
- $username : string
Return values
$this —transportStarted()
Not used.
public
transportStarted(Swift_Events_TransportChangeEvent $evt) : mixed
Parameters
Return values
mixed —transportStopped()
Not used.
public
transportStopped(Swift_Events_TransportChangeEvent $evt) : mixed
Parameters
Return values
mixed —assertOk()
private
assertOk(mixed $response) : mixed
Parameters
- $response : mixed
Return values
mixed —command()
private
command(mixed $command) : mixed
Parameters
- $command : mixed
Return values
mixed —getHostString()
private
getHostString() : mixed