---
title: "PUT /v2/email/identities/{EmailIdentity}/mail-from"
method: PUT
path: "/v2/email/identities/{EmailIdentity}/mail-from"
---

# PUT /v2/email/identities/{EmailIdentity}/mail-from

`PUT /v2/email/identities/{EmailIdentity}/mail-from`

Used to enable or disable the custom Mail-From domain configuration for an email identity.

## Path parameters

- `EmailIdentity` string, required

## Request body

- object
  - `MailFromDomain` string — The domain to use as a MAIL FROM domain.
  - `BehaviorOnMxFailure` 'USE_DEFAULT_VALUE' | 'REJECT_MESSAGE' — <p>The action to take if the required MX record can't be found when you send an email. When you set this value to <code>UseDefaultValue</code>, the mail is sent using <i>amazonses.com</i> as the MAIL FROM domain. When you set this value to <code>RejectMessage</code>, the Amazon SES API v2 returns a <code>MailFromDomainNotVerified</code> error, and doesn't attempt to deliver the email.</p> <p>These behaviors are taken when the custom MAIL FROM domain configuration is in the <code>Pending</code>, <code>Failed</code>, and <code>TemporaryFailure</code> states.</p>

## Response `200`

Success

- PutEmailIdentityMailFromAttributesResponse — An HTTP 200 response if the request succeeds, or an error message if the request fails.

## Other responses

- `480` — NotFoundException
- `481` — TooManyRequestsException
- `482` — BadRequestException

---

[API](https://skmtc.net/aws/apis/sesv2.md) · [All operations](https://skmtc.net/aws/apis/sesv2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/sesv2/versions/25eba06e7f64/schema)
