cPanel WHM icon

cPanel WHM

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

Actions262

DNS → Create mail exchanger record

AI-generated

Summary

Create a new DNS mail exchanger (MX) record for a specified domain within WHM.

Inputs

  • Domain (required) — The domain for which the MX record is created.
  • Name (required) — The name of the MX record.
  • Exchange (required) — The mail exchanger domain to route mail to.
  • Preference (required) — The priority of the MX record, where lower numbers have higher priority.
  • Class — The record's class, defaults to 'IN' if not specified.
  • TTL — Time To Live in seconds for the MX record, defaults to 14400 if not specified.

Output shape

a single object representing the created MX record and its details as returned by the WHM API

The output contains the API response from WHM indicating success or failure and the created DNS MX record details.

Links

Discussion