docs(email): warn that send_email is live under alchemy dev - #865
Conversation
|
The way Miniflare and Wrangler handle it, the message is |
|
Yes — logging-by-default with an opt-in for real sends is what we'd want. The catch is that a faithful stub is entirely a In cloudflare-runtime (distilled):
In alchemy:
Happy to implement in that order (runtime PR first, then submodule bump + alchemy wiring) if you're good with the placement and the opt-in name. |
|
Yeah that sounds great! Go ahead - would be happy to review and merge when ready. The one part of your plan that I'd alter is making the option flag |
|
|
|
Runtime half is up: alchemy-run/cloudflare-tools#76 (the |
|
Is this ready to merge @john-royal ? |
|
Docs need to be updated now that the local binding is implemented and remote now defaults to false. After that, good to merge. |
Under
alchemy dev, asend_emailbinding is live — there is no local stub, sosend()from a dev loop sends real mail from the configured domain. The remote-real design is documented on the local development page, but its examples are all storage (recoverable side effects), and the email guide never mentions dev behavior at the point where users wire up the binding.This bit us in practice: we guarded our email transport with "if the binding's runtime object is undefined, log instead of sending", assuming dev leaves the binding absent. It doesn't — the object is a live proxy, and local test runs of an OTP flow made real send attempts.
cloudflare/email/send-and-receive.mdx: a:::cautionon the binding section — live in dev, gate on an env var /ALCHEMY_STAGEinstead of binding absence, and made-up recipient addresses are still real sends.environments/local-development.mdx: one paragraph noting "everything is real" includes side-effectful bindings, not just storage.