An ESMTP handler for AUTH support.

package Swift
subpackage Transport
author Chris Corbyn

 Methods

Create a new AuthHandler with $authenticators for support.

__construct(array $authenticators) 

Parameters

Runs immediately after a EHLO has been issued.

afterEhlo(\Swift_Transport_SmtpAgent $agent) 

Parameters

$agent

\Swift_Transport_SmtpAgent

to read/write

Returns an array of method names which are exposed to the Esmtp class.

exposeMixinMethods() : string[]

Returns

string[]

Get the auth mode to use to authenticate.

getAuthMode() : string

Returns

string

Get the Authenticators which can process a login request.

getAuthenticators() : \Swift_Transport_Esmtp_Authenticator[]

Get the name of the ESMTP extension this handles.

getHandledKeyword() : boolean

Returns

boolean

Not used.

getMailParams() : string[]

Returns

string[]

Get the password to authenticate with.

getPassword() : string

Returns

string

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

getPriorityOver(string $esmtpKeyword) : int

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

Parameters

$esmtpKeyword

string

to compare with

Returns

int

Not used.

getRcptParams() : string[]

Returns

string[]

Get the username to authenticate with.

getUsername() : string

Returns

string

Not used.

onCommand(\Swift_Transport_SmtpAgent $agent, string $command, int[] $codes, string[] $failedRecipients, boolean $stop) 

Parameters

$agent

\Swift_Transport_SmtpAgent

to read/write

$command

string

to send

$codes

int[]

expected in response

$failedRecipients

string[]

&$failedRecipients

$stop

boolean

&$stop to be set true if the command is now sent

Not used.

resetState() 

Set the auth mode to use to authenticate.

setAuthMode(string $mode) 

Parameters

$mode

string

Set the Authenticators which can process a login request.

setAuthenticators(array $authenticators) 

Parameters

Set the parameters which the EHLO greeting indicated.

setKeywordParams(array $parameters) 

Parameters

$parameters

string[]

Set the password to authenticate with.

setPassword(string $password) 

Parameters

$password

string

Set the username to authenticate with.

setUsername(string $username) 

Parameters

$username

string

Returns the authenticator list for the given agent.

_getAuthenticatorsForAgent() : array
access protected

Returns

array

 Properties

 

$_auth_mode : string
access private
 

$_authenticators : \Swift_Transport_Esmtp_Authenticator[]
access private
 

$_esmtpParams : string[]
access private
 

$_password : string
access private
 

$_username : string
access private