| 1 | import * as Cloudflare from "@/Cloudflare/index.ts"; |
| 2 | |
| 3 | const senderAddress = process.env.CLOUDFLARE_TEST_EMAIL_FROM; |
| 4 | const destinationAddress = process.env.CLOUDFLARE_TEST_EMAIL_TO; |
| 5 | |
| 6 | /** |
| 7 | * `send_email` binding for the deployed test Worker. Restricted to the |
| 8 | * sender/destination pair supplied via env so the e2e test exercises a |
| 9 | * real `.send()` round-trip against Cloudflare. |
| 10 | */ |
| 11 | export const Email = Cloudflare.Email.SendEmail("Email", { |
| 12 | allowedSenderAddresses: senderAddress ? [senderAddress] : undefined, |
| 13 | destinationAddress, |
| 14 | }); |