IMP_Remote_Account
in package
implements
Serializable
Object representation of a remote mail account.
Tags
Table of Contents
Interfaces
- Serializable
Constants
- IMAP = 1
- LOGIN_BAD = 0
- LOGIN_BAD_CHANGED = 1
- LOGIN_OK = 2
- LOGIN_OK_CHANGED = 3
- POP3 = 2
Properties
- $hostspec : string
- $id : string
- $imp_imap : IMP_Imap_Remote
- $label : string
- $port : int
- $secure : mixed
- $type : int
- $username : string
- $_config : array<string|int, mixed>
- Configuration.
Methods
- __construct() : mixed
- __get() : mixed
- __serialize() : array<string|int, mixed>
- __set() : mixed
- __toString() : string
- String representation of object.
- __unserialize() : void
- login() : int
- Attempt to login to remote account.
- mailbox() : string
- Return mailbox name.
- serialize() : mixed
- unserialize() : mixed
Constants
IMAP
public
mixed
IMAP
= 1
LOGIN_BAD
public
mixed
LOGIN_BAD
= 0
LOGIN_BAD_CHANGED
public
mixed
LOGIN_BAD_CHANGED
= 1
LOGIN_OK
public
mixed
LOGIN_OK
= 2
LOGIN_OK_CHANGED
public
mixed
LOGIN_OK_CHANGED
= 3
POP3
public
mixed
POP3
= 2
Properties
$hostspec
public
string
$hostspec
Remote host.
$id read-only
public
string
$id
Remote account storage ID.
$imp_imap read-only
public
IMP_Imap_Remote
$imp_imap
IMP IMAP object.
$label
public
string
$label
Remote account label.
$port
public
int
$port
Remote server port.
$secure
public
mixed
$secure
See backends.php ('secure' parameter).
$type
public
int
$type
The connection type (self::IMAP or self::POP3).
$username
public
string
$username
Remote username.
$_config
Configuration.
protected
array<string|int, mixed>
$_config
= array()
Methods
__construct()
public
__construct() : mixed
__get()
public
__get(mixed $name) : mixed
Parameters
- $name : mixed
__serialize()
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>__set()
public
__set(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed
__toString()
String representation of object.
public
__toString() : string
Return values
string —The identifier (mailbox) ID.
__unserialize()
public
__unserialize(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
login()
Attempt to login to remote account.
public
login([string $password = null ][, bool $save = false ]) : int
Parameters
- $password : string = null
-
The password to use. If null, attempts to use the encrypted password stored in the config.
- $save : bool = false
-
If true, save the password (encrypted) to the config.
Return values
int —One of the LOGIN_* constants.
mailbox()
Return mailbox name.
public
mailbox(string $id) : string
Parameters
- $id : string
-
Base IMAP name.
Return values
string —IMP mailbox name.
serialize()
public
serialize() : mixed
unserialize()
public
unserialize(mixed $data) : mixed
Parameters
- $data : mixed