---
title: "corestack_email_enable"
url: https://docs.corefinity.com/mcp/tools/corestack_email_enable
type: tool
last_updated: 2026-11-13
feature: email
related:
  - https://docs.corefinity.com/api/reference/site-settings/create-site-email.md
  - https://docs.corefinity.com/guides/sites/site-settings/outbound-email.md
---
# corestack_email_enable

**Set up email sending.** Set up email sending for a production row through Mailgun: a sending domain under the site's domain (the default when you leave it out) and the sender address. The task ends when the domain is created and the site uses it; then add its DNS records (corestack_email_apply_dns) and verify (corestack_email_verify). Scope: write. Long-running: answers with a task.

- Scope: `write`
- Runs as a task: yes

## When to use it

Set up email sending for a production row through Mailgun: a sending domain under the site's domain (the default when you leave it out) and the sender address. The task ends when the domain is created and the site uses it; then add its DNS records (corestack_email_apply_dns) and verify (corestack_email_verify).

## Inputs

- `site_id` (integer, ≥ 1, required)
- `domain` (string, or null, up to 253 characters): The sending domain, under the site's domain; corestack_email_get shows the default.
- `sender` (object, required)
  - `address` (string, up to 254 characters, required): An address on the site's domain.
  - `name` (string, or null, up to 80 characters)
- `adopt` (boolean): Staff only: adopt a domain already at Mailgun.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "adopt": {
      "description": "Staff only: adopt a domain already at Mailgun.",
      "type": "boolean"
    },
    "domain": {
      "description": "The sending domain, under the site's domain; corestack_email_get shows the default.",
      "maxLength": 253,
      "type": [
        "string",
        "null"
      ]
    },
    "sender": {
      "additionalProperties": false,
      "properties": {
        "address": {
          "description": "An address on the site's domain.",
          "maxLength": 254,
          "type": "string"
        },
        "name": {
          "maxLength": 80,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "address"
      ],
      "type": "object"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "sender"
  ],
  "type": "object"
}
```

## Refusals

- `unavailable`: email sending is set up on the production row only (staging and development rows send to a test inbox, Mailpit); use the production row. On a WordPress site whose platform plugins are turned off the message says only PHP mail is caught there (corestack_email_get's `mailpit.note`).
- `duplicate`: the same thing already exists; read the current list and update it instead.
- `staff_managed`: Corefinity's team manages this for the row; contact support.
- `exists`: the sending domain already exists at the email provider and cannot be taken over from here; contact support.
- `managed_elsewhere` (message: "This site is managed by another control panel"): another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_email_enable",
  "arguments": {
    "site_id": 4211,
    "sender": {
      "address": "shop@example.co.uk",
      "name": "Example Shop"
    }
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_email_enable with site_id 4211, sender {"address":"shop@example.co.uk","name":"Example Shop"}. (Set up email sending.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [POST /api/corestack/sites/{site}/email](https://docs.corefinity.com/api/reference/site-settings/create-site-email.md)
- Guide: [Outbound email](https://docs.corefinity.com/guides/sites/site-settings/outbound-email.md)
