SShortSingh.
Back to feed

Two Ways to Send Email from Cloudflare Workers: Native Binding vs External API

0
·1 views

Developers using Cloudflare Workers can send emails via either Cloudflare's native Email Service binding or an external HTTP email API like Notify. The native binding requires no external API key but is currently in beta and restricted to the Workers Paid plan, meaning free-tier users cannot send to arbitrary recipients. Setup involves onboarding a domain through the Cloudflare dashboard, after which DNS records such as SPF, DKIM, and DMARC are added automatically. The external API approach uses a standard fetch() call with a stored secret key, making it compatible with Workers' V8 isolate runtime, which does not support Node.js-specific libraries. Both methods support sender and recipient restrictions, and the native binding simulates email locally by default without actually sending messages unless remote mode is enabled.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Hash Side-Effect Ledgers to Safely Validate Cleanup Refactors in Legacy Code

Software cleanup refactors can silently break production systems when hidden couplings—such as shared file paths, environment flags, or unnamed caches—shift without triggering existing unit tests. A proposed workflow addresses this by first recording a canonical ledger of all side effects produced by a module's public entrypoint across test fixtures, then storing a SHA-256 hash of that ledger in source control. Any subsequent cleanup commit is only accepted if the hash remains identical, confirming that no hidden behavior has changed. The protocol also enforces a 'file-touch budget,' limiting each cleanup to editing one implementation file and one test file to prevent scope creep. If the hash changes, the change must be reclassified as a behavior modification, documented with an intentional test, and resubmitted—preventing AI coding agents from disguising functional changes as style-only refactors.

0
ProgrammingDEV Community ·

Developer Builds ShrekOS After Finding No Existing Tool Manages AI Agent Permissions Well

A developer known online is building ShrekOS, a custom Linux distribution designed to safely run multiple AI agents on a personal computer. The project grew from a simple desire for better security controls into a full immutable Debian-based system with isolated workloads, capability grants, and controlled network access. The developer repeatedly tried to replace it with existing solutions such as Docker, virtual machines, or security middleware, but found none addressed the core problem. The missing piece, they argue, is a desktop-level interface that shows users exactly what each running agent is permitted to do — not vague app-level prompts, but specific file and network access requests. ShrekOS aims to enforce those granular permissions from outside the agent itself, making approvals meaningful and auditable.

0
ProgrammingDEV Community ·

Developers Built a Neural Net and SQL Analytics Tool Using Only Python's Standard Library

Two developers building DataLens, a data analytics tool, imposed a strict no-third-party-package rule, forcing them to replace NumPy entirely with hand-written Python code. They manually implemented matrix multiplication, activation functions, and backpropagation using nested loops and Python's lesser-known array module, which stores numeric data contiguously for better performance. For the SQL analytics layer, they leveraged Python's built-in sqlite3 module in in-memory mode, discovering it could handle joins, aggregates, and indexes without any external database setup. A key challenge was representing 2D matrices using the array module, which only supports primitive types, requiring them to flatten matrices to 1D and manage index arithmetic manually. The project forced both developers to deeply understand foundational machine learning mechanics they had previously taken for granted through high-level libraries.

0
ProgrammingDEV Community ·

High Website Traffic but Few Leads? The Problem Is Trust, Not Visitors

Many businesses with decent website traffic still struggle to generate leads, and the root cause is often poor on-site conversion rather than insufficient visitors. A site analysis across real estate, construction, hospitality, and retail sectors reveals that most visitors leave within seconds due to unclear messaging, weak calls to action, and absent social proof. Conversion rate — the share of visitors who take a desired action — matters more than raw traffic, since doubling visitors on a poorly optimized site still wastes the vast majority of potential leads. Common trust-breaking issues include vague hero sections, generic CTAs like 'Learn More', no testimonials, and mobile or speed problems that go undetected in standard analytics reports. Fixing these concrete on-page elements, rather than spending more on traffic acquisition, is what typically closes the gap between visits and actual leads.

Two Ways to Send Email from Cloudflare Workers: Native Binding vs External API · ShortSingh