Configuration

Save encrypted installation SMTP settings

PUT
/api/settings/email

Authorization

sessionCookie
cookiebetter-auth.session_token<token>

The Better Auth email/password session cookie used by the web application.

Request Body

  1. body
host*string
Match^[^\s/:]+$
Length1 <= length <= 253
port*integer
Range1 <= value <= 65535
secure*boolean
from*string
Match^[^\r\n]+@[^\r\n]+$
Length3 <= length <= 320
username*string
Lengthlength <= 320
enabled*boolean
password?|null

Response Body

Response for status 200

application/json
  1. response
host*string
port*integer
Range1 <= value <= 65535
secure*boolean
from*string
username*string
Lengthlength <= 320
enabled*boolean
hasPassword*boolean
source*string
Value in"database""deployment""none"
Example Request
curl -X PUT 'https://postbot.example/api/settings/email' \
  -H 'Content-Type: application/json' \
  -d '{
  "host": "string",
  "port": 1,
  "secure": true,
  "from": "string",
  "username": "string",
  "enabled": true
}'
Example Response
{
  "host": "string",
  "port": 1,
  "secure": true,
  "from": "string",
  "username": "string",
  "enabled": true,
  "hasPassword": true,
  "source": "database"
}

Was this page helpful?