Cloudflare Workers and SMTP
Runtime: V8 isolate (edge)
Verdict: Works. Raw TCP is supported through a dedicated connect() API, with one exception: port 25 is blocked outright.
What actually happens on this platform
Workers run in a V8 isolate with no OS-level sockets by default, but Cloudflare added connect() specifically so Workers could speak arbitrary TCP protocols including SMTP. startTls() upgrades an existing plain connection to TLS in place, which is exactly the STARTTLS-on-587 pattern ZeroSMTP uses.
The part worth reading twice
A TCP socket “cannot be created in global scope and shared across requests” - open the connection inside the request handler itself, the same way the Node.js examples in CODE-EXAMPLES.md already do, rather than trying to reuse one across invocations.
If it works here
The connection itself is the same as everywhere else: point at mx.msgwing.com on port 587 (STARTTLS) or 465 (SSL/TLS), authenticate with a username and password. Register at msgwing.com first, then use the Node.js/TypeScript example unmodified - nothing about running inside this platform changes the SMTP conversation itself, only whether the platform lets you open that connection in the first place.
Where this came from
Read off TCP Sockets, Cloudflare Workers’s own documentation, checked 2026-08-30 - rather than recalled. If that page and this one now disagree, that page is right and this one is out of date - say so.
Related
Last reviewed 2026-08-30.
Updated 30 Aug 2026