| GET | /api/settings/smtp |
| PUT | /api/settings/smtp |
| DELETE | /api/settings/smtp |
| POST | /api/settings/smtp/test |
Read SMTP config
GET/api/settings/smtp
Returns effective config with password masked.
Authentication: bearer token.
Permission: settings.smtp.
bash
curl -X GET "https://shellius.example.com/api/settings/smtp" \
-H "Authorization: Bearer $SHELLIUS_TOKEN"200 OK
json
{ "success": true, "data": { … } }Upsert SMTP config
PUT/api/settings/smtp
Joi validate, upsert, encrypt password.
Authentication: bearer token.
Permission: settings.smtp.
Request body
| Name | Type | Required | Notes |
|---|---|---|---|
host | string | Yes | 1–255 characters. |
port | number | No | 1–65535. |
username | string | No | At most 255 characters. May be null. |
password | string | No | At most 1000 characters. May be null. |
fromAddress | string | No | An email address. May be null. |
useTls | boolean | No | |
isActive | boolean | No |
bash
curl -X PUT "https://shellius.example.com/api/settings/smtp" \
-H "Authorization: Bearer $SHELLIUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"host": "…"
}'200 OK
json
{ "success": true, "data": { … } }Delete SMTP config
DELETE/api/settings/smtp
Drops the DB row, falls back to env defaults.
Authentication: bearer token.
Permission: settings.smtp.
bash
curl -X DELETE "https://shellius.example.com/api/settings/smtp" \
-H "Authorization: Bearer $SHELLIUS_TOKEN"200 OK
json
{ "success": true, "data": { … } }Send test mail
POST/api/settings/smtp/test
Sends a test email to the caller's own address.
Authentication: bearer token.
Permission: settings.smtp.
bash
curl -X POST "https://shellius.example.com/api/settings/smtp/test" \
-H "Authorization: Bearer $SHELLIUS_TOKEN"200 OK
json
{ "success": true, "data": { … } }