This function allows the system to automatically create mailboxes for a cPanel account. The system will create a new mailbox when it receives an email address in plus address format and that mailbox does not exist. For example, receiving an email from the user+newmailbox@example.com address creates the newmailbox mailbox if the newmailbox mailbox does not exist.
Note:
To disable this functionality, use the UAPI Email::disable_mailbox_autocreate function.
uapi --output=jsonpretty \ --user=username \ Email \ enable_mailbox_autocreate \ email='username@example.com'
{- "apiversion": 3,
- "func": "enable_mailbox_autocreate",
- "module": "Email",
- "result": {
- "data": 1,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}