Child pages
  • WHM API 1 Functions - fetch_mail_queue

Versions Compared

Key

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

Description

Excerpt

This function retrieves the contents of the server's mail queue.

Multiexcerpt include
SpaceWithExcerptcom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@12665
MultiExcerptNameAPIDisabledSendMailRole
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/fetch_mail_queue?api.version=1



Expand
titleXML API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/fetch_mail_queue?api.version=1



Expand
titleCommand Line


Code Block
languagebash
whmapi1 fetch_mail_queue

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{
  "data": {
    "records": [
      {
        "time": 1371552781,
        "sender": "elvis@graceland.com",
        "user": null,
        "msgid": "1UotX3-0002HX-Lr",
        "recipients": [
          "pricilla@graceland.com"
        ],
        "frozen": 0,
        "size": 14336
      }
    ]
  },
  "metadata": {
    "command": "fetch_mail_queue",
    "version": 1,
    "reason": "OK",
    "result": 1
  }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<result>
    <data>
        <records>
            <user/>
            <msgid>1UotX3-0002HX-Lr</msgid>
            <frozen>0</frozen>
            <size>14336</size>
            <time>1371552781</time>
            <sender>elvis@graceland.com</sender>
            <recipients>pricilla@graceland.com</recipients>
        </records>
    </data>
    <metadata>
        <result>1</result>
        <version>1</version>
        <command>fetch_mail_queue</command>
        <reason>OK</reason>
    </metadata>
</result>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
recordsarray of hashesAn array of hashes of the message information.Each hash includes the user, msgid, frozen, size, time, and sender returns and the recipients array. 

user

integer

The mail message's owner.

This function returns this value in the records array.

A valid username.null

msgid

string

The mail message's ID.

This function returns this value in the records array.

A valid string.1UotX3-0002HX-Lr

frozen

Boolean

Whether the mail message is frozen.

This function returns this value in the records array.

  • 1 — Frozen.
  • 0Not frozen.
0

size

integer

The mail message's size.

This function returns this value in the records array.

A positive integer that measures the message size in bytes.14336

time

integer

The mail message's timestamp.

This function returns this value in the records array.

A valid date in Unix time format.1371552781

sender

string

The mail message's sender.

This function returns this value in the records array.

A valid string.elvis@graceland.com

recipients

array

An array of the mail message's recipients.

This function returns this array in the records array.

This array includes the mail message recipients' email addresses.pricilla @graceland.com