---
title: "Set how an application's end user notices are sent"
method: PUT
path: "/applications/{id}/email-sender"
tags: ["Applications"]
---

# Set how an application's end user notices are sent

`PUT /applications/{id}/email-sender`

## Request

- Base URL: `https://api.customdomain.ai/v1`
- URL: `https://api.customdomain.ai/v1/applications/{id}/email-sender`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Replaces the setting. `mode` is `default` (the CustomDomain™ sender), `smtp` (the platform's own mail server, with the notice's From taken from `from_address` and `from_name`) or `none` (nothing is sent; use the `connection.records_outdated` webhook instead). With `smtp`, the host must be a public address, the port one of 25, 465, 587 or 2525, and TLS is always on: `implicit` on 465, `starttls` on the others. Plain text is not offered. The password is sealed at rest; leave `smtp_password` out to keep the stored one. A change of server, login or sender clears `verified_at`. A mail failure at send time falls back to the default sender for that message and is recorded in `last_error`. Requires `app:write`.

## Path parameters

- `id` string, required

## Request body

- EmailSenderInput
  - `mode` 'default' | 'smtp' | 'none', required
  - `smtp_host` string: A public host name or address. Private
  - `smtp_port` 25 | 465 | 587 | 2525
  - `smtp_username` string
  - `smtp_password` string: Write only. Omit to keep the stored password.
  - `tls` 'implicit' | 'starttls': implicit on port 465
  - `from_address` string: A plain address such as hello@example.com. Required for smtp.
  - `from_name` string
  - `reply_to` string

## Response `200`

Saved.

- EmailSender
  - `application_id` string, required
  - `mode` 'default' | 'smtp' | 'none', required
  - `smtp_host` string, required
  - `smtp_port` integer, required
  - `smtp_username` string, required
  - `password_set` boolean, required: Whether a password is stored. The password itself is never returned.
  - `tls` 'implicit' | 'starttls', required
  - `from_address` string, required
  - `from_name` string, required
  - `reply_to` string, required
  - `verified_at` string, date-time, nullable, required
  - `last_error` string, required: The last failure
  - `last_error_at` string, date-time, nullable, required
  - `updated_at` string, date-time, nullable

## Other responses

- `400`: Error envelope: {code, title, details}.
- `401`: Error envelope: {code, title, details}.
- `403`: Error envelope: {code, title, details}.
- `404`: Error envelope: {code, title, details}.
- `503`: Error envelope: {code, title, details}.

---

[API](https://skmtc.dev/customdomain/apis/customdomain-control-plane-api.md) · [All operations](https://skmtc.dev/customdomain/apis/customdomain-control-plane-api/llms.txt) · [OpenAPI document](https://skmtc.dev/customdomain/apis/customdomain-control-plane-api/revisions/34d89cb7a7cd?raw)
