Child pages
  • WHM API 0 Functions - purge_mail_queue
Skip to end of metadata
Go to start of metadata

 

Description

This function purges the mail server's queue.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/purge_mail_queue
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/purge_mail_queue
 Command Line
whmapi0 purge_mail_queue


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 0 documentation or run the whmapi0 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi0 command:

    /usr/local/cpanel/bin/whmapi0

 Output (JSON)
{
  "statusmsg": "Mail queue remove started in background",
  "status": 1,
  "data": "Removal Run Started"
}
 Output (XML)
<purge_mail_queue>
    <data>Removal Run Started</data>
    <status>1</status>
    <statusmsg>Mail queue remove started in background</statusmsg>
</purge_mail_queue>

   

Parameters

This function does not accept parameters. 

Returns

ReturnTypeDescriptionPossible valuesExample
datastring

The mail server's response.

A valid string.
Removal Run Started

status

Boolean

Whether the function succeeded.

 

  • 1 — Success.
  • 0 — Failure.
1

statusmsg

string

The function's status.

 

A valid string.
Mail queue remove started in background