Overview
  • Namespace
  • Class

Namespaces

  • Omines
    • DirectAdmin
      • Context
      • Objects
        • Database
        • Domains
        • Email
        • Users
      • Utility

Classes

  • Forwarder
  • Mailbox
  • MailObject

Class Mailbox

Encapsulates a full mailbox with POP/IMAP/webmail access.

Omines\DirectAdmin\Objects\BaseObject
Extended by Omines\DirectAdmin\Objects\DomainObject
Extended by Omines\DirectAdmin\Objects\Email\MailObject
Extended by Omines\DirectAdmin\Objects\Email\Mailbox
Namespace: Omines\DirectAdmin\Objects\Email
Author: Niels Keurentjes niels.keurentjes@omines.com
Located at DirectAdmin/Objects/Email/Mailbox.php

Methods summary

public
# __construct( string $prefix, Omines\DirectAdmin\Objects\Domain $domain, string|array|null $config = null )

Construct the object.

Construct the object.

Parameters

$prefix
The part before the @ in the address
$domain
The containing domain
$config
URL encoded config string as returned by CMD_API_POP

Overrides

Omines\DirectAdmin\Objects\DomainObject::__construct
public static Omines\DirectAdmin\Objects\Email\Mailbox
# create( Omines\DirectAdmin\Objects\Domain $domain, string $prefix, string $password, integer|null $quota = null, integer|null $sendLimit = null )

Creates a new mailbox.

Creates a new mailbox.

Parameters

$domain
Domain to add the account to
$prefix
Prefix for the account
$password
Password for the account
$quota
Quota in megabytes, or zero/null for unlimited
$sendLimit
Send limit, or 0 for unlimited, or null for system default

Returns

Omines\DirectAdmin\Objects\Email\Mailbox
The created mailbox
public
# delete( )

Deletes the mailbox.

Deletes the mailbox.

public
# setPassword( string $newPassword )

Reset the password for this mailbox.

Reset the password for this mailbox.

Parameters

$newPassword
public float|null
# getDiskLimit( )

Returns the disk quota in megabytes.

Returns the disk quota in megabytes.

Returns

float|null
public float
# getDiskUsage( )

Returns the disk usage in megabytes.

Returns the disk usage in megabytes.

Returns

float
public integer
# getMailsSent( )

Return the amount of mails sent in the current period.

Return the amount of mails sent in the current period.

Returns

integer
protected mixed
# getData( string $key )

Cache wrapper to keep mailbox stats up to date.

Cache wrapper to keep mailbox stats up to date.

Parameters

$key

Returns

mixed

Methods inherited from Omines\DirectAdmin\Objects\Email\MailObject

getEmailAddress(), getPrefix(), invokeDelete()

Methods inherited from Omines\DirectAdmin\Objects\DomainObject

getDomain(), getDomainName(), invokePost(), toDomainObjectArray()

Methods inherited from Omines\DirectAdmin\Objects\BaseObject

clearCache(), getCache(), getCacheItem(), getContext(), getName(), setCache(), toObjectArray(), toRichObjectArray()

Constants summary

string CACHE_DATA
# 'mailbox'
API documentation generated by ApiGen