TYPO3
7.6
Users
bogdan
Projects
Kapeli
Resources
Dash
Docsets
TYPO3
src
vendor
swiftmailer
swiftmailer
lib
classes
Swift
Transport
Esmtp
Auth
LoginAuthenticator.php
Go to the documentation of this file.
1
<?php
2
3
/*
4
* This file is part of SwiftMailer.
5
* (c) 2004-2009 Chris Corbyn
6
*
7
* For the full copyright and license information, please view the LICENSE
8
* file that was distributed with this source code.
9
*/
10
16
class
Swift_Transport_Esmtp_Auth_LoginAuthenticator
implements
Swift_Transport_Esmtp_Authenticator
17
{
23
public
function
getAuthKeyword
()
24
{
25
return
'LOGIN'
;
26
}
27
37
public
function
authenticate
(
Swift_Transport_SmtpAgent
$agent, $username, $password)
38
{
39
try
{
40
$agent->
executeCommand
(
"AUTH LOGIN\r\n"
, array(334));
41
$agent->
executeCommand
(sprintf(
"%s\r\n"
, base64_encode($username)), array(334));
42
$agent->
executeCommand
(sprintf(
"%s\r\n"
, base64_encode($password)), array(235));
43
44
return
true
;
45
}
catch
(
Swift_TransportException
$e) {
46
$agent->
executeCommand
(
"RSET\r\n"
, array(250));
47
48
return
false
;
49
}
50
}
51
}
Generated on Wed Nov 11 2015 01:51:59 for TYPO3 by
1.8.3