user_notify

The user_notify method checks to see if the specified user has any unseen mail in their Inbox.

This method can be run by the following admin types:

  • company
  • company_mail
  • company_mail2
  • company_view
  • domain
  • mail
  • workgroup

Syntax

{
    <credentials object>, 
    "user": <mailbox_name>
}

Request fields for user_notify

The following fields can be used in the user_notify method:

Field nameObligationDefinition/Value
userRequiredThe user's email address.

Response fields for user_notify

The following fields may be returned in response to the user_notify method:

Field nameObligationDescription/Value
errorReturned if success = falseA text string that explains the error.
error_numberReturned if success = falseA number that represents the error.
new_mailReturned if success = trueIndicates whether or not there is unseen mail in the specified user's Inbox. Allowed values are true and false.
successAlways returnedIndicates whether the request was successful or not. Allowed values are true and false.

Examples for user_notify

Request

{
  "credentials": {
    "user": "[email protected]",
    "password": "pencil75"
  },
  "user": "[email protected]
}

Response

If the Inbox contains unread mail

{
  "success": true,
  "new_mail": true,
  "audit": "pin28_514b678124"
}

Response

If the Inbox does not contain any unread mail

{
  "success": true,
  "new_mail": false,
  "audit": "hammer28_514b678124"
}