INTEGRITY Dokumentace

Konfigurace send bindings

Když přidáte send_email binding k Workeru můžete omezit, ze kterých a na které adresy smí odesílat. Tato omezení nakonfigurujete v konfiguračním souboru Wrangler. Popis samotného binding API najdete v Workers API.

Typy bindingů

Každá položka v send_email lze nakonfigurovat tak, aby omezovalo, co binding smí dělat. Adresa odesílatele musí vždy patřit doméně, kterou jste zaregistrovali do 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]" ]

Další kroky