Set the mail server for email reminders (owners only)
const url = 'http://127.0.0.1:8484/api/v1/settings/smtp';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"from":"example","host":"example","password":"example","port":1,"tls":"starttls","username":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:8484/api/v1/settings/smtp \ --header 'Content-Type: application/json' \ --data '{ "from": "example", "host": "example", "password": "example", "port": 1, "tls": "starttls", "username": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”object
A URL to the JSON Schema for this object.
Sender address, e.g. reminders@example.com
SMTP server, e.g. smtp.example.com
Leave empty to keep the saved password
Default: 587 with starttls, 465 with tls, 25 with none
Starttls (default), tls (implicit, port 465) or none (local relays)
Responses
Section titled “Responses”OK
object
A URL to the JSON Schema for this object.
Webhooks and ntfy may reach private-network addresses
object
An access token is saved; it is never returned
Where members subscribe to their topic
Empty: the default public server
Address used for links in messages; empty when the server was started without –public-url
object
A password is saved; it is never returned
Env: set by EXHALE_SMTP_* on the server and not editable in the web
Example
{ "$schema": "https://example.com/api/schemas/ChannelsStatus.json", "allowPrivateSource": "env", "ntfy": { "source": "env" }, "smtp": { "source": "env", "tls": "starttls" }}default
Section titled “default”Error
object
A URL to the JSON Schema for this object.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
Example
{ "$schema": "https://example.com/api/schemas/ErrorModel.json", "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}