ILIAS
Release_4_0_x_branch Revision 61816
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
POP3.php
Go to the documentation of this file.
1
<?php
2
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
3
31
require_once
'Auth/Container.php'
;
35
require_once
'PEAR.php'
;
39
require_once
'Net/POP3.php'
;
40
55
class
Auth_Container_POP3
extends
Auth_Container
56
{
57
58
// {{{ properties
59
64
var
$server
=
'localhost'
;
65
70
var
$port
=
'110'
;
71
82
var
$method
=
true
;
83
84
// }}}
85
// {{{ Auth_Container_POP3() [constructor]
86
93
function
Auth_Container_POP3
(
$server
=null)
94
{
95
if
(isset(
$server
) && !is_null(
$server
)) {
96
if
(is_array(
$server
)) {
97
if
(isset(
$server
[
'host'
])) {
98
$this->server =
$server
[
'host'
];
99
}
100
if
(isset(
$server
[
'port'
])) {
101
$this->port =
$server
[
'port'
];
102
}
103
if
(isset(
$server
[
'method'
])) {
104
$this->method =
$server
[
'method'
];
105
}
106
}
else
{
107
if
(strstr(
$server
,
':'
)) {
108
$serverparts = explode(
':'
, trim(
$server
));
109
$this->server = $serverparts[0];
110
$this->port = $serverparts[1];
111
}
else
{
112
$this->server =
$server
;
113
}
114
}
115
}
116
}
117
118
// }}}
119
// {{{ fetchData()
120
128
function
fetchData
($username,
$password
)
129
{
130
$this->
log
(
'Auth_Container_POP3::fetchData() called.'
,
AUTH_LOG_DEBUG
);
131
$pop3 =&
new
Net_POP3();
132
$res
= $pop3->connect($this->server, $this->port, $this->method);
133
if
(!
$res
) {
134
$this->
log
(
'Connection to POP3 server failed.'
,
AUTH_LOG_DEBUG
);
135
return
$res
;
136
}
137
$result
= $pop3->login($username,
$password
);
138
$pop3->disconnect();
139
return
$result
;
140
}
141
142
// }}}
143
144
}
145
?>
Services
PEAR
lib
Auth
Container
POP3.php
Generated on Wed Apr 27 2016 19:01:48 for ILIAS by
1.8.1.2 (using
Doxyfile
)