GSSMTP

Доступность объекта: оператор связи. Объект:

Наименование

Тип

Описание

host *

StringType

Адрес SMTP-сервера.

port *

IntType

Порт SMTP-сервера.

from_address *

EmailType

Адрес отправителя.

from_name *

StringType

Имя отправителя.

username

StringType

Логин SMTP.

password

StringType

Пароль SMTP.

use_tls

BooleanType

Использовать TLS (SMTPS). default=False.

start_tls

BooleanType

Использовать STARTTLS. default=True.

verify_ssl

IntType

Проверка SSL-сертификата: 0 — системная, 1 — включена, 2 — выключена. default=0.

Получение объекта:

POST {{v2_host}}/api/
Content-Type: application/json
Authorization: Bearer {{auth_token}}

{
  "action": "get",
  "obj": "GSSMTP",
  "action_id": "123",
  "params": {
  }
}

Изменение объекта

POST {{v2_host}}/api/
Content-Type: application/json
Authorization: Bearer {{auth_token}}

{
  "action": "update",
  "obj": "GSSMTP",
  "action_id": "123",
  "params": {
      "host": "smtp.same.net",
      "port": 577,
      "username": "noreply@runtel.ru",
      "password": "------------------",
      "from_address": "noreply@runtel.ru",
      "from_name": "Informator",
      "start_tls": true,
      "use_tls": false
  }
}

Тестирование объекта

POST {{v2_host}}/api/
Content-Type: application/json
Authorization: Bearer {{auth_token}}

{
  "action": "test",
  "obj": "gs_smtp",
  "action_id": "123",
  "params": {
      "host": "smtp.yandex.ru",
      "port": 587,
      "username": "noreply@runtel.ru",
      "password": "408807HnOS",
      "from_address": "noreply@runtel.ru",
      "from_name": "Informator",
      "start_tls": true,
      "use_tls": false
  }
}