> For the complete documentation index, see [llms.txt](https://apidocs.zerionsoftware.com/doc/iformbuilder-v81/llms.txt)

# Update Email Settings

> PUT /email_settings
> 
> Updates the server's email alert settings. Every field is optional; an omitted field is not changed. A setting that has no stored value yet is created.
> 
> Omit `password` to keep the stored password. An empty `password`, or one made only of `*` characters, also keeps it. Changing `host` or `username` from the stored value needs a new `password` in the same request, so a stored password is never sent to a different server or account.
> 
> Sending any of `host`, `from_address`, `username` or `password` sets a custom SMTP server. After the merge with the stored values, all four must be non-empty, so the first custom SMTP save needs all four.
> 
> ### Authorization
> 
> Same as `GET /email_settings`: internal API clients only; COMPANY or SERVER users on a ZWS-integrated server, SERVER users only otherwise.



## Servers
- https://api.iformbuilder.com/exzact/api/v81/[servername]: https://api.iformbuilder.com/exzact/api/v81/[servername]


## Authentication methods
- Oauth2


## Parameters
### Headers

- **Authorization** (string)
  e.g. Bearer {access_token}




### Body: application/json (object)

- **host** (string)
  the SMTP host name or IP address, optionally prefixed with `ssl://` or `tls://`; no port

- **from_address** (string(email))
  the sender address of alert email

- **username** (string)
  the SMTP user name

- **password** (string(password))
  the SMTP password; omit, or send only `*` characters, to keep the stored one

- **subject** (string)
  the subject of an alert whose form sets none; non-empty

- **footer** (string)
  the first footer of alert email; may be empty

- **footer2** (string)
  the second footer of alert email; may be empty



## Responses
### 200
OK - the settings were saved. The body is the updated settings, in the same shape as `GET`.

#### Body: application/json (object)
- **custom** (boolean)
  `true` when the server has its own SMTP settings; `false` when alerts use the server default

- **host** (string | null)
  the SMTP host; `null` when not set

- **from_address** (string | null)
  the sender address of alert email; `null` when not set

- **username** (string | null)
  the SMTP user name; `null` when not set

- **password_set** (boolean)
  `true` when a non-empty SMTP password is stored

- **subject** (string)
  the subject of an alert whose form sets none

- **footer** (string)
  the first footer of alert email

- **footer2** (string)
  the second footer of alert email


### 400
Bad Request - the body is not a JSON object, a field has the wrong type, `subject`, `host`, `from_address` or `username` is empty or spans more than one line, `host` is not a host name or IP address, `from_address` is not a valid email address, or the SMTP credentials would be left incomplete.

### 401
Unauthorized - missing or invalid bearer token.

### 403
Forbidden - the client is not internal, or the user's role is not allowed (see Authorization).


[Powered by Bump.sh](https://bump.sh)
