This function creates an email forwarder.
Important:
In cPanel & WHM version 76 and later, when you disable the MailReceive role, the system disables this function. For more information, read our How to Use Server Profiles documentation.
uapi --output=jsonpretty \ --user=username \ Email \ add_forwarder \ domain='example.com' \ email='forwardme@example.com' \ fwdopt='fwd'
{- "apiversion": 3,
- "func": "add_forwarder",
- "module": "Email",
- "result": {
- "data": [
- {
- "domain": "example.com",
- "email": "user@example.com",
- "forward": "fwdtome@example.com"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}