Encore is an open source TypeScript backend framework. You define your infrastructure (databases, queues, cron jobs, API endpoints) directly in your application code using the Encore SDK.
Encore understands your app's architecture and uses it to run your app locally, provision cloud infrastructure (in your AWS or GCP account), and give you observability like distributed tracing and service catalogs, all without config files or boilerplate.
Learn more about Encore →Resend is an email API built for developers. It handles transactional email delivery with high deliverability, analytics, and support for React Email templates.
You send emails through a simple API. Resend handles DKIM, SPF, DMARC, bounce handling, and deliverability so you don't have to deal with email infrastructure.
Learn more about Resend →
The infrastructure you'd eventually build around email (async delivery via Pub/Sub, secrets per environment, preview environments, tracing) already done, in your AWS or GCP account.
Define a message topic in TypeScript, publish email events to it, and return immediately. Encore delivers messages in the background with automatic retries.
Start free on Encore Cloud. When you're ready, connect your own AWS or GCP account and Encore deploys there instead. No code changes.
Every API call and email send gets a visual timeline showing what happened, how long it took, and where it failed.
Every pull request gets a full copy of your backend with its own secrets and message topics. Test email flows before merging.
Define cron jobs in TypeScript for digest emails, reminders, and drip campaigns. Encore runs them for you.
Store your Resend API key in Encore instead of .env files. Each environment (local, preview, production) has its own values.
Build email templates with React components. Type-safe, composable, and easy to test locally.
Configure Resend, publish email events, and let Encore handle delivery in the background.
Initialize the Resend SDK with your API key stored as an Encore secret. Secrets are encrypted per environment and injected at runtime.
import { Resend } from "resend";
import { secret } from "encore.dev/config";
const apiKey = secret("RESEND_API_KEY");
export const resend = new Resend(apiKey());Encore's Pub/Sub lets you define message topics in TypeScript. Publishing returns instantly so your endpoints stay fast. Encore delivers messages in the background with automatic retries.
import { Topic, Subscription } from "encore.dev/pubsub";
import { resend } from "./resend";
export interface EmailEvent {
to: string;
subject: string;
html: string;
from?: string;
}
export const emailTopic = new Topic<EmailEvent>("emails", {
deliveryGuarantee: "at-least-once",
});
// Encore processes this in the background
const _ = new Subscription(emailTopic, "send-email", {
handler: async (event) => {
const { error } = await resend.emails.send({
from: event.from ?? "Your App <hello@yourapp.com>",
to: event.to,
subject: event.subject,
html: event.html,
});
if (error) throw new Error(error.message);
},
});Publish to the topic from any service. The email is delivered asynchronously and every message is automatically traced so you can see exactly what happened, locally and in production.
import { api } from "encore.dev/api";
import { emailTopic } from "../email/topic";
interface SignupRequest {
email: string;
name: string;
}
export const signup = api(
{ expose: true, method: "POST", path: "/signup" },
async (req: SignupRequest): Promise<void> => {
// Create the user...
// Send welcome email (non-blocking)
await emailTopic.publish({
to: req.email,
subject: "Welcome to our app!",
html: `<p>Hi ${req.name}, thanks for signing up!</p>`,
});
}
);Every Pub/Sub message and API call is traced automatically. See exactly when an email was published, when Resend received it, and whether delivery succeeded, locally and in production. No instrumentation code to write.
Learn more about tracing →The boring, error-prone work that Resend and Encore eliminate.
You focus on your product. That's it.
Because Encore defines infrastructure in code and provides built-in distributed tracing, AI coding assistants like Claude and Cursor can build and debug your entire Resend integration end-to-end.
They can read your Encore services to understand email flows and Pub/Sub topics, then inspect traces to diagnose exactly what happened when a Resend email was sent or a delivery failed.
Connect your AWS or GCP account and deploy. Encore provisions the infrastructure directly in your account: databases, load balancers, IAM roles, networking. Same code you've been running on Encore Cloud.
You can see it all in your console. Customer data stays in your infrastructure. Full control when you need it.
Learn how cloud deployment works →Declare what you need in TypeScript. Encore provisions it in your AWS or GCP account.
RDS or Cloud SQL for email logs, templates, and delivery tracking.
AWS Secrets Manager or GCP Secret Manager for API keys.
SQS or GCP Pub/Sub for async email delivery and retries.
CloudWatch or Cloud Scheduler for digest emails and drip campaigns.
ALB or Cloud Load Balancing with automatic certificates.
S3 or Cloud Storage for email attachments and templates.
Proper IAM roles, VPCs, and security groups by default.
Distributed tracing, metrics, and logging out of the box.