WHMCS Module

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents

V 1.0.43

 

As of this version it's possible to set a so called "Soft Delete" for mailboxes. That means, in  case a mailbox get deleted in the client area, you can set a value of days for the final delete of the affected mailbox(es).
Please see the description below, how to setup and use.

First of all it's huge important to setup WHMCS's cron jobs properly as the system use this to execute the final deletion of a mailbox. To check if cronjobs are setup, please have a look into the "Automation Status" top right in the Admin Area. Next, top left you can see the cron status. It should look similar to this, depending on your config:

Image Added

If you see any not working cron item, please take care to solve the error before using this version. Otherwise the final deletion of a mailbox won't work.


To setup your products to use this feature, please edit all your products and set the "Default Deletion in Days" field to a value that fits as default for you. The final value can later adjusted by the mailbox admin in the Client Area.

Image Added

Please note (this is huge important):
You need to save at least one of your product, even you do not want to setup a default value for "Default Deletion in Days". Otherwise the responsible database table does not get created!

In the Client Area it's now possible to click on the "Delete" button as usual. Now there will be a new popup window to define the final delete of a mailbox. The default value here is what you have set in the Admin Area before.
If you have no default value set, it's always "0" days. Important: "0" days means, the mailbox get deleted immediately.

Image Added

After confirmation you'll see the affected mailbox in the list marked as strikethrough as in the example below.

Image Added

You'll also have a new entry on the left for the overview of all marked mailboxes for the final deletion.

Image Added

Please note:
All mailboxes marked as "Soft Delete" get removed the permission by an API call with the following body parameter:

Code Block
{
  "send": false,
  "receive": false,
  "maillogin": false,
  "weblogin": false
}

The mailbox admin has also the option to remove the "Soft Delete" again, for sure only if the mailbox got not deleted finally. To do, just click the "trash" icon in the overview below and confirm.
After that, the permission are granted again.


Final note about the execution time of the mailbox delete via cron:

The cron job currently operates with day-level precision. For example, if a client creates a mailbox deletion request on 20.05.2026 and specifies that the mailbox should be permanently deleted after one day, the hook will delete the mailbox on 21.05.2026 immediately after the WHMCS daily cron job has finished running.

Therefore it's huge important to setup cronjobs as described above. The cronjob settings you can find in the Admin Area in "Settings" > "Automation Settings"

Image Added}

V 1.0.43

The option "Allow To Change Password" when creating a product get now included within the responsible API call when creating or changing a mailbox.

...