Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZMailAccount Class Reference

## Public Member Functions
| __construct ( $id="")
| delete ( $id=-1)
| store ()
| get ( $id="")
| id ()
| userID ()
| setUserID ( $value)
| setUser ( $user)
| name ()
| setName ( $value)
| loginName ()
| setLoginName ( $value)
| password ()
| setPassword ( $value)
| server ()
| setServer ( $value)
| serverPort ()
| setServerPort ( $value)
| deleteFromServer ()
| setDeleteFromServer ( $value)
| isActive ()
| setIsActive ( $value)
| serverType ()
| setServerType ( $value)
| checkMail ()
| getNewMail ( $LoginName, $Password, $ServerName, $ServerPort=110)

## Static Public Member Functions
static | isOwner ( $user, $accountID)
static | getByUser ( $user)

## Public Attributes
| $ID
| $UserID
| $Name
| $LoginName
| $Password
| $Server
| $ServerPort
| $DeleteFromServer
| $IsActive
| $ServerType

## Detailed Description

! eZMail eZMailAccount documentation.

Example code:

Definition at line 60 of file ezmailaccount.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZMailAccount::__construct | ( |  | $id = `""` | ) |

constructor

Definition at line 65 of file ezmailaccount.php.

References $id, and $ID.

## Member Function Documentation

## ◆ checkMail()

eZMailAccount::checkMail | ( |  | ) |

Checks if there is any new mail in this accounts. Downloads according to the setup, and filters it to the correct folder if filters are enabled. Currently this function only works for pop3.

Definition at line 396 of file ezmailaccount.php.

References $filters, $i, $mail, $server, $user, eZUser\currentUser(), disectThisPart(), exit, getHeaders(), eZMailFolder\getSpecialFolder(), eZHTTPTool\header(), INBOX, eZMail\isDownloaded(), Password, and UNREAD.

## ◆ delete()

eZMailAccount::delete | ( |  | $id = `-1` | ) |

Deletes a eZMailAccount object from the database.

Definition at line 79 of file ezmailaccount.php.

References $db, $id, and eZDB\globalDatabase().

## ◆ deleteFromServer()

eZMailAccount::deleteFromServer | ( |  | ) |

Returns 1 if mail gets deleted from server after download. 0 If not.

Definition at line 302 of file ezmailaccount.php.

References $DeleteFromServer.

## ◆ get()

eZMailAccount::get | ( |  | $id = `""` | ) |

Fetches the object information from the database.

Definition at line 152 of file ezmailaccount.php.

References $db, $id, $ret, eZDB\globalDatabase(), Name, and Password.

## ◆ getByUser()

static eZMailAccount::getByUser | ( |  | $user | ) |
| static

Returns all mail accounts for a selected user as an array of eZMailAccount objects.

Definition at line 372 of file ezmailaccount.php.

References $db, $i, $user, and eZDB\globalDatabase().

## ◆ getNewMail()

eZMailAccount::getNewMail | ( |  | $LoginName,
|  |  | $Password,
|  |  | $ServerName,
|  |  | $ServerPort = `110`
| ) |  |

\Static Gets all new mails, removes from server

Definition at line 457 of file ezmailaccount.php.

References $i, $LoginName, $mail, $Password, $server, $user, disectThisPart(), exit, getHeaders(), eZHTTPTool\header(), and UNREAD.

## ◆ id()

eZMailAccount::id | ( |  | ) |

Definition at line 187 of file ezmailaccount.php.

References $ID.

## ◆ isActive()

eZMailAccount::isActive | ( |  | ) |

Returns 1 if the account is active. Inactive accounts should not be checked.

Definition at line 319 of file ezmailaccount.php.

References $IsActive.

## ◆ isOwner()

static eZMailAccount::isOwner | ( |  | $user,
|  |  | $accountID
| ) |  |
| static

Returns true if the given account belongs to the given user.

Definition at line 353 of file ezmailaccount.php.

References $db, $res, $user, and eZDB\globalDatabase().

## ◆ loginName()

eZMailAccount::loginName | ( |  | ) |

Returns the login name for the account.

Definition at line 236 of file ezmailaccount.php.

References $LoginName.

## ◆ name()

eZMailAccount::name | ( |  | ) |

Returns the name of the account.

Definition at line 220 of file ezmailaccount.php.

References $Name.

## ◆ password()

eZMailAccount::password | ( |  | ) |

Returns the password for the account.

Definition at line 253 of file ezmailaccount.php.

References $Password.

## ◆ server()

eZMailAccount::server | ( |  | ) |

Returns the server for the account.

Definition at line 270 of file ezmailaccount.php.

References $Server.

## ◆ serverPort()

eZMailAccount::serverPort | ( |  | ) |

Returns the server port for this account.

Definition at line 286 of file ezmailaccount.php.

References $ServerPort.

## ◆ serverType()

eZMailAccount::serverType | ( |  | ) |

Returns the server type..Not used at the moment.

Definition at line 335 of file ezmailaccount.php.

References $ServerType.

## ◆ setDeleteFromServer()

eZMailAccount::setDeleteFromServer | ( |  | $value | ) |

1- Mail gets deleted from server after download 0-Leaves the mail alone.

Definition at line 311 of file ezmailaccount.php.

## ◆ setIsActive()

eZMailAccount::setIsActive | ( |  | $value | ) |

Sets the account active. Inactive accounts will not be checked.

Definition at line 327 of file ezmailaccount.php.

## ◆ setLoginName()

eZMailAccount::setLoginName | ( |  | $value | ) |

Sets the login name for the account.

Definition at line 244 of file ezmailaccount.php.

## ◆ setName()

eZMailAccount::setName | ( |  | $value | ) |

Sets the name of the account.

Definition at line 228 of file ezmailaccount.php.

References Name.

## ◆ setPassword()

eZMailAccount::setPassword | ( |  | $value | ) |

Sets the password for the account. TODO: encrypt it.

Definition at line 262 of file ezmailaccount.php.

References Password.

## ◆ setServer()

eZMailAccount::setServer | ( |  | $value | ) |

Sets the server for this account.

Definition at line 278 of file ezmailaccount.php.

## ◆ setServerPort()

eZMailAccount::setServerPort | ( |  | $value | ) |

Sets the server port for this account.

Definition at line 294 of file ezmailaccount.php.

## ◆ setServerType()

eZMailAccount::setServerType | ( |  | $value | ) |

Sets the server type. Not used at the moment.

Definition at line 343 of file ezmailaccount.php.

## ◆ setUser()

eZMailAccount::setUser | ( |  | $user | ) |

Sets the account owner with a user.

Definition at line 211 of file ezmailaccount.php.

References $user.

## ◆ setUserID()

eZMailAccount::setUserID | ( |  | $value | ) |

Sets the account owner

Definition at line 203 of file ezmailaccount.php.

## ◆ store()

eZMailAccount::store | ( |  | ) |

Stores a mail to the database.

Definition at line 97 of file ezmailaccount.php.

References $db, $name, $result, $server, eZDB\globalDatabase(), Name, and Password.

## ◆ userID()

eZMailAccount::userID | ( |  | ) |

Returns the ID of the account owner

Definition at line 195 of file ezmailaccount.php.

References $UserID.

## Member Data Documentation

## ◆ $DeleteFromServer

eZMailAccount::$DeleteFromServer

Definition at line 513 of file ezmailaccount.php.

Referenced by deleteFromServer().

## ◆ $ID

eZMailAccount::$ID

Definition at line 506 of file ezmailaccount.php.

Referenced by __construct(), and id().

## ◆ $IsActive

eZMailAccount::$IsActive

Definition at line 514 of file ezmailaccount.php.

Referenced by isActive().

## ◆ $LoginName

eZMailAccount::$LoginName

Definition at line 509 of file ezmailaccount.php.

Referenced by getNewMail(), and loginName().

## ◆ $Name

eZMailAccount::$Name

Definition at line 508 of file ezmailaccount.php.

Referenced by name().

## ◆ $Password

eZMailAccount::$Password

Definition at line 510 of file ezmailaccount.php.

Referenced by getNewMail(), and password().

## ◆ $Server

eZMailAccount::$Server

Definition at line 511 of file ezmailaccount.php.

Referenced by server().

## ◆ $ServerPort

eZMailAccount::$ServerPort

Definition at line 512 of file ezmailaccount.php.

Referenced by serverPort().

## ◆ $ServerType

eZMailAccount::$ServerType

Definition at line 515 of file ezmailaccount.php.

Referenced by serverType().

## ◆ $UserID

eZMailAccount::$UserID

Definition at line 507 of file ezmailaccount.php.

Referenced by userID().

The documentation for this class was generated from the following file:

- ezmailaccount.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.