POST api/2.0/settings/smtp
Данная функция требует аутентификации
Описание
Сохраняет настройки SMTP для текущего портала.
Параметры
Название | Описание | Тип | Пример |
smtpSettings sent in body | Настройки SMTP | ASC.Api.Settings.Smtp.SmtpSettingsWrapper |
Пример
POST api/2.0/settings/smtp
Host: yourportal.Р7.com
Content-Type: application/json
Accept: application/json
{
"smtpSettings": {
"Host": null,
"Port": null,
"SenderAddress": null,
"SenderDisplayName": null,
"CredentialsUserName": null,
"CredentialsUserPassword": null,
"EnableSSL": false,
"EnableAuth": false
}
}
Возвращает
Настройки SMTP
Пример ответа
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>