POST /system/email_servers/{email_server_id}
Updates an existing email server.
MIME Type |
---|
application/json |
Parameter | Type | Optionality | Data Type | MIME Type | Description |
---|---|---|---|---|---|
email_server_id |
path |
Required |
Number (Integer) |
text/plain |
Required - The id of the email server to get. |
Parameter | Data Type | MIME Type | Description | Sample |
---|---|---|---|---|
email_server_details |
Object |
application/json |
Required - An email server details record that contains the following fields:
|
{ "default": true, "description": "String", "enable_tls": true, "hostname": "String", "password": "String", "port": 42, "username": "String" } |
HTTP Response Code | Unique Code | Description |
---|---|---|
200 |
The email server record was updated. |
|
404 |
3000 |
The email server does not exist. |
409 |
3010 |
An email server with the same hostname, port and username already exists. |
422 |
3001 |
The hostname cannot be longer than 255 characters. |
422 |
3002 |
The hostname is an IP address. |
422 |
3003 |
Port must be bewtween 1 and 65535 inclusive. |
422 |
3004 |
The username cannot be longer than 255 characters. |
422 |
3005 |
The password cannot be longer than 255 characters. |
422 |
3006 |
The description cannot be longer than 255 characters. |
422 |
3007 |
The default value can only be set to true. |
422 |
3013 |
The username cannot contain spaces or quotes. |
422 |
3014 |
Username or password not given while updating either field for email server. |
422 |
3016 |
null |
500 |
3008 |
Problem encountered while updating default email server database entry. |
500 |
3009 |
Problem encountered while attempting to read the default email server from the database. |
500 |
3011 |
Problem encountered while encrypting email server password. |
500 |
3012 |
Problem encountered while attempting to read the database. |
500 |
3015 |
Failed to notify the hosts affected by this update that they should update their email server settings. |
500 |
3017 |
Failed to update the postfix certificate configuration with new email server settings. |
Response Description
- id - Number - ID of the email server.
- description - String - Description of the email server.
- hostname - String - Hostname of the email server.
- port - Number - Port to connect to the email server with.
- username - String - User name to authenticate with the email server.
- password - String - Password to authenticate with the email server.
- enable_tls - Boolean - Whether to ignore TLS verification errors to the email server.
Response Sample
{
"default": true,
"description": "String",
"enable_tls": true,
"hostname": "String",
"id": 42,
"password": "String",
"port": 42,
"username": "String"
}