Get Started
Usage API
More information

POST api/2.0/settings/smtp This function requires authentication

Description

Saves the SMTP settings for the current portal.

Parameters
Name Description Type Example
smtpSettings
sent in body
SMTP settings ASC.Api.Settings.Smtp.SmtpSettingsWrapper
Example
POST api/2.0/settings/smtp
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "smtpSettings": {
    "Host": "mail.example.com",
    "Port": 25,
    "SenderAddress": "notify@example.com",
    "SenderDisplayName": "Postman",
    "CredentialsUserName": "notify@example.com",
    "CredentialsUserPassword": "{password}",
    "EnableSSL": false,
    "EnableAuth": true
  }
}
Returns

SMTP settings

Example Response

application/json

{
  "status": 0,
  "response": {
    "Host": "mail.example.com",
    "Port": 25,
    "SenderAddress": "notify@example.com",
    "SenderDisplayName": "Postman",
    "CredentialsUserName": "notify@example.com",
    "CredentialsUserPassword": "{password}",
    "EnableSSL": false,
    "EnableAuth": true
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <Host>mail.example.com</Host>
    <Port>25</Port>
    <SenderAddress>notify@example.com</SenderAddress>
    <SenderDisplayName>Postman</SenderDisplayName>
    <CredentialsUserName>notify@example.com</CredentialsUserName>
    <CredentialsUserPassword>{password}</CredentialsUserPassword>
    <EnableSSL>False</EnableSSL>
    <EnableAuth>True</EnableAuth>
  </response>
</result>