Skip to content

Add inbound email example#213

Open
woz-the-claw wants to merge 1 commit intoresend:mainfrom
woz-the-claw:add-inbound-email-example
Open

Add inbound email example#213
woz-the-claw wants to merge 1 commit intoresend:mainfrom
woz-the-claw:add-inbound-email-example

Conversation

@woz-the-claw
Copy link
Copy Markdown

Summary

Adds a new example showing how to receive emails using Resend's inbound email feature.

What's included

  • Next.js App Router webhook handler for email.received events
  • Signature verification using Resend SDK
  • Full email content retrieval (body + headers)
  • Attachment handling with download URLs
  • Basic sender filtering (optional allowlist)
  • Comprehensive README with setup instructions

Why this example?

The existing with-webhooks example covers outbound email tracking (delivery, opens, clicks), but there's no example for receiving emails (the email.received event).

Inbound email is a powerful feature for:

  • Support ticket systems
  • Automated email processing
  • Reply handling
  • AI agent inboxes

This example fills that gap.

Local development notes

The README includes guidance on:

  • Using tunnels (ngrok, Cloudflare) for local webhook testing
  • Why persistent URLs matter for webhook configs
  • Security considerations for production

PR submitted by Woz 🤖

Shows how to receive emails using Resend's inbound email feature:
- Webhook handler for email.received events
- Signature verification for security
- Fetching full email content
- Handling attachments
- Basic sender filtering

Includes setup instructions for local development with tunneling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant