Documentation

AuthHandler
in package
implements HandlerInterface

SMTP auth handler class

Tags
category

Pop

author

Chris Corbyn, from the SwiftMailer library https://github.com/swiftmailer/swiftmailer

version
4.0.0

Table of Contents

Interfaces

HandlerInterface
SMTP handler interface

Properties

$authenticators  : array<string|int, mixed>
Authenticators available to process the request.
$authMode  : string|null
The auth mode for authentication
$esmtpParams  : array<string|int, mixed>
The ESMTP AUTH parameters available
$password  : string|null
The password for authentication
$username  : string|null
The username for authentication

Methods

__construct()  : mixed
Create a new AuthHandler with $authenticators for support
afterEhlo()  : void
Runs immediately after a EHLO has been issued
getAuthenticators()  : array<string|int, mixed>
Get the Authenticators which can process a login request
getAuthMode()  : string|null
Get the auth mode to use to authenticate
getHandledKeyword()  : string
Get the name of the ESMTP extension this handles
getMailParams()  : array<string|int, mixed>
Not used
getPassword()  : string|null
Get the password to authenticate with
getPriorityOver()  : int
Returns +1, -1 or 0 according to the rules for usort().
getRcptParams()  : array<string|int, mixed>
Not used
getUsername()  : string|null
Get the username to authenticate with
onCommand()  : void
Not used
resetState()  : void
Not used
setAuthenticators()  : void
Set the Authenticators which can process a login request
setAuthMode()  : void
Set the auth mode to use to authenticate
setKeywordParams()  : void
Set the parameters which the EHLO greeting indicated
setPassword()  : void
Set the password to authenticate with
setUsername()  : void
Set the username to authenticate with
getAuthenticatorsForAgent()  : array<string|int, mixed>
Returns the authenticator list for the given agent

Properties

$authenticators

Authenticators available to process the request.

private array<string|int, mixed> $authenticators = []

$authMode

The auth mode for authentication

private string|null $authMode = null

$esmtpParams

The ESMTP AUTH parameters available

private array<string|int, mixed> $esmtpParams = []

$password

The password for authentication

private string|null $password = null

$username

The username for authentication

private string|null $username = null

Methods

__construct()

Create a new AuthHandler with $authenticators for support

public __construct(array<string|int, mixed> $authenticators) : mixed
Parameters
$authenticators : array<string|int, mixed>

getAuthenticators()

Get the Authenticators which can process a login request

public getAuthenticators() : array<string|int, mixed>
Return values
array<string|int, mixed>

getAuthMode()

Get the auth mode to use to authenticate

public getAuthMode() : string|null
Return values
string|null

getHandledKeyword()

Get the name of the ESMTP extension this handles

public getHandledKeyword() : string
Return values
string

getMailParams()

Not used

public getMailParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPassword()

Get the password to authenticate with

public getPassword() : string|null
Return values
string|null

getPriorityOver()

Returns +1, -1 or 0 according to the rules for usort().

public getPriorityOver(string $esmtpKeyword) : int

This method is called to ensure extensions can be execute in an appropriate order.

Parameters
$esmtpKeyword : string

to compare with

Return values
int

getRcptParams()

Not used

public getRcptParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getUsername()

Get the username to authenticate with

public getUsername() : string|null
Return values
string|null

onCommand()

Not used

public onCommand(AgentInterface $agent, string $command[, array<string|int, mixed> $codes = [] ][, bool &$stop = false ]) : void
Parameters
$agent : AgentInterface
$command : string
$codes : array<string|int, mixed> = []
$stop : bool = false

setAuthenticators()

Set the Authenticators which can process a login request

public setAuthenticators(array<string|int, mixed> $authenticators) : void
Parameters
$authenticators : array<string|int, mixed>

setAuthMode()

Set the auth mode to use to authenticate

public setAuthMode(string $mode) : void
Parameters
$mode : string

setKeywordParams()

Set the parameters which the EHLO greeting indicated

public setKeywordParams(array<string|int, mixed> $parameters) : void
Parameters
$parameters : array<string|int, mixed>

setPassword()

Set the password to authenticate with

public setPassword(string $password) : void
Parameters
$password : string

setUsername()

Set the username to authenticate with

public setUsername(string $username) : void
Parameters
$username : string

getAuthenticatorsForAgent()

Returns the authenticator list for the given agent

protected getAuthenticatorsForAgent() : array<string|int, mixed>
Tags
throws
Exception
Return values
array<string|int, mixed>

        
On this page

Search results