Skip to content

Save SMTP settings

PUT
/v1/setup/smtp
curl --request PUT \
--url http://localhost:8080/v1/setup/smtp \
--header 'Content-Type: application/json' \
--data '{ "host": "example", "port": 1, "tlsMode": "example", "username": "example", "password": "example", "fromAddress": "example", "fromName": "example" }'

Step 4. Stores the relay host, port, TLS mode (none, starttls, ssl), optional credentials and the from address and name; a blank password keeps the stored one. Resets setup.smtp_tested: send a test email (POST /v1/settings/test/smtp) before activation. Administrators only. 400 for invalid fields.

Media typeapplication/json
object
host
string
port
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
tlsMode

None | starttls | ssl

string
username
null | string
password

Empty keeps the stored password.

null | string
fromAddress
string
fromName
string
Examplegenerated
{
"host": "example",
"port": 1,
"tlsMode": "example",
"username": "example",
"password": "example",
"fromAddress": "example",
"fromName": "example"
}

No Content