POST api/2.0/smtpsettings/smtp
Saves the SMTP settings for the current portal.
Name |
Description |
Type |
Example |
Host
sent in body
|
Host
|
System.String
|
|
Port
sent in body
|
Port
|
System.Nullable{System.Int32}
|
|
SenderAddress
sent in body
|
Sender address
|
System.String
|
|
SenderDisplayName
sent in body
|
Sender display name
|
System.String
|
|
CredentialsUserName
sent in body
|
Credentials username
|
System.String
|
|
CredentialsUserPassword
sent in body
|
Credentials user password
|
System.String
|
|
EnableSSL
sent in body
|
Enables SSL or not
|
System.Boolean
|
|
EnableAuth
sent in body
|
Enables authentication or not
|
System.Boolean
|
|
POST api/2.0/smtpsettings/smtp
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json
{
"Host": "mail.example.com",
"Port": "25",
"SenderAddress": "notify@example.com",
"SenderDisplayName": "Postman",
"CredentialsUserName": "notify@example.com",
"CredentialsUserPassword": "{password}",
"EnableSSL": true,
"EnableAuth": false
}
application/json
{
"status": 0,
"response": {
"Host": "mail.example.com",
"Port": "25",
"SenderAddress": "notify@example.com",
"SenderDisplayName": "Postman",
"CredentialsUserName": "notify@example.com",
"CredentialsUserPassword": "{password}",
"EnableSSL": true,
"EnableAuth": false
}
}
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>True</EnableSSL>
<EnableAuth>False</EnableAuth>
</response>
</result>