# set_site_email_domain_receiving

Source: https://modulify.ai/docs/mcp/emails/set-site-email-domain-receiving

Turns receiving on or off for one verified email domain of a site, which decides whether mail sent to that domain is forwarded.

- Title: Turn receiving on or off for an email domain
- Scope: `config:write`
- Access: Destructive

While receiving is on, and while the site's forwarding is on, mail sent to any address at exactly that domain is forwarded to the site's confirmed forwarding addresses, just like mail to the built-in sending domain, replies to a sending address on that domain included. That mail only arrives once the domain's MX record points to the value of its receiving record, which `emailDomains.items` lists while receiving is on. Pointing it there moves all of the domain's mail away from the mailboxes it reaches today, so the tool tells the client to confirm that with you first.

Turning it on is refused while the domain is not verified, with `Only a verified email domain can receive email!`, and while forwarding is not set up on the platform, with `Email forwarding is not set up on this server yet!` It is also refused while one of the site's forwarding addresses is at that domain, because forwarding to it would loop, with `A forwarding address of this site is at this domain, so its mail would come straight back. Remove that address first!`

Turning it off always works. But while the domain's MX record still points here, every message sent to it from then on, and any message still waiting to be forwarded, is dropped and never forwarded later. The tool tells the client to confirm that with you first and to tell you to point the MX record back at your own mailboxes.

It needs the **Delete projects** permission, like the forwarding switch. See [Receive mail at your domain](https://modulify.ai/docs/automations/emails#receive-mail-at-your-domain).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `domainId` | string | Yes | The id of the email domain, from `emailDomains.items` in `get_site_email_settings`. |
| `enabled` | boolean | Yes | True to turn receiving on, false to turn it off. |