INTEGRITY Документация

Настройка привязок отправки

Когда вы добавляете send_email привязку к Worker, вы можете ограничить адреса, с которых и на которые она может отправлять письма. Настройте эти ограничения в файле конфигурации Wrangler. Сведения об API самой привязки см. в API Workers.

Типы привязок

Каждая запись в send_email можно настроить так, чтобы ограничить возможности привязки. Адрес отправителя всегда должен принадлежать домену, подключённому к Email Service.

{
	"send_email": [
		// Send to any verified destination
		{ "name": "EMAIL" },
		// Send only to a single fixed destination
		{
			"name": "NOTIFY_OPS",
			"destination_address": "[email protected]",
		},
		// Send only to addresses on an allowlist
		{
			"name": "EMAIL_TEAM",
			"allowed_destination_addresses": [
				"[email protected]",
				"[email protected]",
			],
		},
		// Send only from addresses on an allowlist
		{
			"name": "RESTRICTED_EMAIL",
			"allowed_sender_addresses": [
				"[email protected]",
				"[email protected]",
			],
		},
	],
}
[[send_email]]
name = "EMAIL"

[[send_email]]
name = "NOTIFY_OPS"
destination_address = "[email protected]"

[[send_email]]
name = "EMAIL_TEAM"
allowed_destination_addresses = [ "[email protected]", "[email protected]" ]

[[send_email]]
name = "RESTRICTED_EMAIL"
allowed_sender_addresses = [ "[email protected]", "[email protected]" ]

Следующие шаги