Child pages
  • WHM API 1 Function - unblock_incoming_email_from_domain
Skip to end of metadata
Go to start of metadata

Description

This function unblocks email from specific domains.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/unblock_incoming_email_from_domain?api.version=1&domain=example.com
 Command Line
whmapi1 unblock_incoming_email_from_domain domain=example.com


Notes:

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

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "data": {
    "updated": 1
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": "1",
    "command": "unblock_incoming_email_from_domain"
  }
}


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

ParameterTypeDescriptionPossible valuesExample
domainstring

Required

The domain to unblock.

A valid fully qualified domain name (FQDN).

Note:

  • The function returns 0 for the updated return if the server already doesn't block that domain.
  • An FQDN requires  at least  a  label, a dot (.), and a top-level domain (TLD).
  • Enter an asterisk (*) to represent  a wildcard label or TLD.
  • To unblock multiple domains, duplicate or increment the parameter name. For example, to unblock three domains, you could:
    • Use the domain parameter multiple times.

    • Use the domain, domain-1, and domain-2 parameters.

example.com

Returns

ReturnTypeDescriptionPossible valuesExample
updatedBoolean

Whether the function unblocked one or more domains .

  • 1 — Success.
  • 0 — Failure.
1