{
	"$schema": "http://json-schema.org/draft-07/schema",
	"$id": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/schemas/mailer.json",
	"type": "object",
	"title": "JWT",
	"additionalProperties": false,
	"required": [
		"enabled",
		"host",
		"username",
		"password",
		"secure",
		"from",
		"theme"
	],
	"properties": {
		"enabled": {
			"$id": "#/properties/enabled",
			"type": "boolean",
			"title": "Mailer enablement",
			"example": false
		},
		"host": {
			"$id": "#/properties/host",
			"type": "string",
			"title": "SMTP host",
			"example": "localhost",
			"anyOf": [
				{
					"format": "hostname"
				},
				{
					"format": "ipv4"
				},
				{
					"format": "ipv6"
				}
			]
		},
		"port": {
			"$id": "#/properties/port",
			"type": "number",
			"title": "SMTP port",
			"example": 465,
			"minimum": 1,
			"maximum": 65535
		},
		"username": {
			"$id": "#/properties/username",
			"type": "string",
			"title": "SMTP username",
			"example": "root"
		},
		"password": {
			"$id": "#/properties/password",
			"type": "string",
			"title": "SMTP password",
			"example": ""
		},
		"secure": {
			"$id": "#/properties/secure",
			"oneOf": [
				{
					"type": "null",
					"description": "None"
				},
				{
					"type": "string",
					"enum": [
						"ssl",
						"tls"
					],
					"description": "ssl - TLS, tls - STARTTLS"
				}
			],
			"title": "SMTP connection security",
			"example": "root"
		},
		"from": {
			"$id": "#/properties/from",
			"type": "string",
			"format": "email",
			"title": "Sender",
			"example": "iqrf-gw@localhost.localdomain"
		},
		"theme": {
			"$id": "#/properties/theme",
			"type": "string",
			"title": "Mail theme",
			"example": "generic"
		},
		"timeout": {
			"$id": "#/properties/timeout",
			"type": "number",
			"title": "SMTP connection timeout (default 20 s)",
			"example": 20
		},
		"context": {
			"$id": "#/properties/context",
			"type": "array",
			"title": "Context for connecting to the SMTP server",
			"example": []
		},
		"clientHost": {
			"$id": "#/properties/clientHost",
			"oneOf": [
				{
					"type": "null"
				},
				{
					"type": "string",
					"format": "hostname"
				}
			],
			"title": "SMTP client hostname",
			"example": "iqrf-gw.localhost.localdomain"
		},
		"persistent": {
			"$id": "#/properties/persistent",
			"type": "boolean",
			"title": "Persistent connection to SMTP server",
			"example": false
		}
	}
}
