cPanel WHM icon

cPanel WHM

Full cPanel WHM API — all 622 operations across Accounts, DNS, Mail, SSL, Backups, Databases and more

Actions262

Mail → Add block on emails from specific countries

AI-generated

Summary

Block incoming emails originating from a specified country by setting an email block rule in the cPanel WHM system.

Inputs

  • Country Code (required) — The two-letter ISO 3166-1 alpha-2 code of the country whose emails should be blocked. Warning: Do not use the 'ZZ' country code if the server uses NAT.

Output shape

a JSON object containing the WHM API response indicating the success or failure of the block rule creation

The response includes status and error messages from the WHM API to confirm whether the block was successfully added or if any errors occurred.

Examples

Example 1: Block emails from France

Set 'Country Code' to 'FR' to block all incoming emails originating from France.

Links

Discussion