TYPO3
7.6
Users
bogdan
Projects
Kapeli
Resources
Dash
Docsets
TYPO3
src
vendor
swiftmailer
swiftmailer
lib
classes
Swift
Transport
Esmtp
Auth
PlainAuthenticator.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_PlainAuthenticator
implements
Swift_Transport_Esmtp_Authenticator
17
{
23
public
function
getAuthKeyword
()
24
{
25
return
'PLAIN'
;
26
}
27
37
public
function
authenticate
(
Swift_Transport_SmtpAgent
$agent, $username, $password)
38
{
39
try
{
40
$message = base64_encode($username.chr(0).$username.chr(0).$password);
41
$agent->
executeCommand
(sprintf(
"AUTH PLAIN %s\r\n"
, $message), array(235));
42
43
return
true
;
44
}
catch
(
Swift_TransportException
$e) {
45
$agent->
executeCommand
(
"RSET\r\n"
, array(250));
46
47
return
false
;
48
}
49
}
50
}
Generated on Wed Nov 11 2015 01:52:01 for TYPO3 by
1.8.3