Child pages
  • WHM API 1 Functions - expunge_messages_for_mailbox_guid

Versions Compared

Key

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

Description

Excerpt

This function removes mail messages from a cPanel account.

Multiexcerpt include
SpaceWithExcerptcom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@12665
MultiExcerptNameAPIDisabledReceiveMailRole
PageWithExcerptLIB:_ServerRoleDisabledAPI

Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/expunge_messages_for_mailbox_guid?api.version=1&account=example&mailbox_guid=2550860f0c58d158c92a000044f0d230&query=savedbefore%2052w



Expand
titleXML API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/expunge_messages_for_mailbox_guid?api.version=1&account=example&mailbox_guid=2550860f0c58d158c92a000044f0d230&query=savedbefore%2052w



Expand
titleCommand Line


Code Block
languagebash
whmapi1 expunge_messages_for_mailbox_guid account=example mailbox_guid=2550860f0c58d158c92a000044f0d230 query="savedbefore 52w"

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{  
   "metadata":{  
      "reason":"OK",
      "command":"expunge_messages_for_mailbox_guid",
      "version":1,
      "result":1
   },
   "data":{  

   }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<result>
    </data>
    <metadata>
        <reason>OK</reason>
        <version>1</version>
        <result>1</result>
        <command>expunge_messages_for_mailbox_guid</command>
    </metadata>
</result>



Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

Parameters

ParameterTypeDescriptionPossible valuesExample
accountstring

Required

The email account's name.

  • The cPanel user's account name.

  • A valid email account that exists on the server.

  • example
  • user@example.com

mailbox_guidstring

Required

The mailbox's globally unique identifier (GUID).

A valid mailbox GUID on the account.

Note
titleNote:

To find the mailbox GUID, use the WHM API 1 - get_mailbox_status function.


2550860f0c58d158c92a000044f0d230
querystring

Required

The query to select which messages you wish to remove from the mailbox.

A valid Dovecot® search query.

For more information, read Dovecot's Search Query documentation.

savedbefore 52w

Returns

This function only returns metadata.