Module "mail"

Description

SOAP WSDL

Available methods

Details

void change_password

Change the password for a mailbox.

This method is special, because you do not need to authenticate
to be able to use it. Instead, you supply the login as well as
the old and new \password. Your old password will be verified
against the current value, if it matches, the password will be
updated to the new \value.

Parameters

  • string $login The login for which to update the password
  • string $current_password The current password
  • string $new_password The new \password

void delete_alias

Delete an alias by supplying its ID

Parameters

  • int $alias_id The ID of the alias to delete

void delete_mailbox

Delete a mailbox by supplying its ID. Be aware that this
function can take some time to complete, since the request is
relayed in real time to the mailserver.

Parameters

  • int $mailbox_id The ID of the mailbox to delete

array get_alias

Retrieve all information associated with an alias by supplying
its ID.

Parameters

  • int $alias_id The ID of the alias to retrieve information for

Returns

  • array $details All the details of the requested alias

array get_aliases_by_domain

Get aliases by domain

Parameters

  • string $domain The domain name
  • string $tld The TLD of the domain name

Returns

  • array $aliases All the details of the requested aliases

array get_aliases_by_mailbox

Retrieve all aliases belonging to a given mailbox ID. The
array that is returned will contain all the info that you
would get with a single call.

Parameters

  • int $mailbox_id The mailbox ID to retrieve the aliases for

Returns

  • array $details All the details of the requested aliases

array get_aliases_by_product

Retrieve all aliases belonging to a given product ID. The
array that is returned will contain all the info that you
would get with a single call.

Parameters

  • int $product_id The product ID to retrieve the aliases for

Returns

  • array $details All the details of the requested aliases

array get_mailbox

Retrieve all information associated with a mailbox by supplying
its ID.

Parameters

  • int $mailbox_id The ID of the mailbox to retrieve information for

Returns

  • array $details All the details of the requested mailbox

array get_mailboxes_by_domain

Get mailboxes by domain
Retrieve all information about all mailboxes from a given domain

Parameters

  • string $domain The domain name
  • string $tld The TLD of the domain name

Returns

  • array $mailboxes All the details of the requested mailboxes

array get_mailboxes_by_product

Retrieve all the mailboxes associated to a given mailbox ID.
The array that is returned will contain all the info that you
would get with a single call.

Parameters

  • int $product_id The product ID to retrieve the mailboxes for

Returns

  • array $details All the details of the requested mailboxes

int insert_alias

Add an alias to the specified product.

The alias types are defined as follows:

1 EMAIL_ALIAS_ACCOUNT
2 EMAIL_ALIAS_ALIAS
3 EMAIL_ALIAS_FORWARD
4 EMAIL_ALIAS_CATCHALL
5 EMAIL_ALIAS_MAILINGLIST

The details array should contain the following keys:

- type
- origin
- dest

Parameters

  • int $product_id The product ID to insert the alias for
  • array $details The details of the alias

Returns

  • int $alias_id The ID of the alias that was created

int insert_mailbox

Add a mailbox to the specified product. The product will
define the domain name the mailbox will be created under, so
only a username needs to be supplied, together with the
username.

The details array should contain the following elements:

- username
- password

Parameters

  • int $product_id The product ID to insert the mailbox for
  • array $details The details of the mailbox

Returns

  • int $mailbox_id The ID of the mailbox that was created

void update_alias

Update the information associated with an alias. This function
allows you to change some options related to an alias. At this
point, you should only update the destination. In the future,
fine grained anti-spam and anti-virus options will be made
available.

The array can contain the following keys:

- dest

Parameters

  • int $alias_id The ID of the alias to update
  • array $details The details that should be updated

void update_mailbox

Update the information associated with a mailbox. This should
only be used to change a password. The array supplied will be
merged into the existing mailbox.

The array can contain the following keys:

- password

Parameters

  • int $mailbox_id The ID of the mailbox to update
  • array $details The details that should be updated

array validate_alias

Validate an alias before submitting it for insertion or
updating.

Note that although an ID is required, if you supply 0 as the ID
the given details will be evaluated against a blank instance,
just as if you were creating a new \one.
If a valid ID is supplied, your details will be merged and
then evaluated, just like for updates.

Parameters

  • int $mailbox_id The mailbox ID to update, submit 0 for none
  • array $details The details to evaluate

Returns

  • array $errors An array containing all the errors found in the supplied alias

array validate_mailbox

Validate a mailbox before submitting it for insertion or
updating.

Note that although an ID is required, if you supply 0 as the ID
the given details will be evaluated against a blank instance,
just as if you were creating a new \one.
If a valid ID is supplied, your details will be merged and
then evaluated, just like for updates.

Parameters

  • int $mailbox_id The mailbox ID to update, submit 0 for none
  • array $details The details to evaluate

Returns

  • array $errors An array containing all the errors found in the supplied mailbox