SMTP::authenticate
Perform SMTP authentication.
Must be run after hello().
Signature
public function authenticate(string
$username,
string
$password,
[string
$authtype = NULL,
[string
$realm = '',
[string
$workstation = '',
[null|OAuth
$OAuth = NULL]]]] )
Parameters
$username
—
string
The user name
$password
—
string
The password
$authtype
—
string
The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5, XOAUTH2)
$realm
—
string
The auth realm for NTLM
$workstation
—
string
The auth workstation for NTLM
$OAuth
—
object
An optional OAuth instance (@see PHPMailerOAuth)
Returns
- bool
- True if successfully authenticated.* @access public
Violations
PHPMessDetector
Line |
Rule |
Message |
362 - 496 |
CyclomaticComplexity
|
The method authenticate() has a Cyclomatic Complexity of 26. The configured cyclomatic complexity threshold is 10. |
362 - 496 |
NPathComplexity
|
The method authenticate() has an NPath complexity of 2668. The configured NPath complexity threshold is 200. |
362 - 496 |
ExcessiveMethodLength
|
The method authenticate() has 135 lines of code. Current threshold is set to 100. Avoid really long methods. |
Checkstyle
Line |
Column |
Severity |
Message |
380 |
132 |
warning
|
Line exceeds 120 characters; contains 132 characters |
460 |
136 |
warning
|
Line exceeds 120 characters; contains 136 characters |