Setup Mailbox
setup_mailboxGive a waiting mailbox (already paid for, or the free trial that comes with a domain registration) its address and password. Free.
Instructions
Give a waiting mailbox (already paid for, or the free trial that comes with a domain registration) its address and password. Free. If none is waiting the result is NO_PENDING_MAILBOX: buy one with create_mailbox (with the user's OK on the price). Leave password out and Porkbun generates a strong one and returns it ONCE in password: give it to the user straight away, it is not shown again (it can be changed later with set_email_password). If you pass one, it needs 12-72 characters with an upper case letter, a lower case letter, a number and a special character. A mailbox needs Porkbun's MX records and SPF include at the domain apex (the same records as email forwarding), and the call puts them in place. If that would delete MX records for another mail service or rewrite the domain's SPF record, it returns DNS_CHANGE_CONFIRMATION_REQUIRED with dnsChanges and changes (and charges) nothing: tell the user what will change, and only with their OK call again with confirm_dns_changes: true. The answer includes clientSettings (IMAP/SMTP hosts and ports) for setting up a mail app. DKIM and DMARC are set up on the website. Needs a verified account email and phone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain the mailbox is on, e.g. `example.com`. | |
| address | Yes | The mailbox address: the part before the @ (`me`) or the whole address. 1-30 characters: letters, digits and + . - _ | |
| dry_run | No | If true, validate and report the DNS changes without setting anything up. | |
| password | No | Optional. Omit to have a strong password generated and returned once. | |
| mailbox_id | No | Which waiting mailbox, from `list_mailboxes`, when there are several. | |
| confirm_dns_changes | No | Set only after the user agreed to the DNS changes a `DNS_CHANGE_CONFIRMATION_REQUIRED` result described. |