Forward Emails with Reloop Inbound
How to forward received emails to another address using Reloop webhooks.
Reloop's inbound email feature can be used to forward received emails to another email address automatically.
How It Works
- Reloop receives an email on your verified domain
- A webhook is triggered with the email data
- Your webhook handler forwards the email via the Reloop API
Setup
1
Enable receiving on your domain
Go to your domain settings and enable receiving.
2
Create a webhook endpoint
Set up a webhook endpoint that listens for email.received events.
3
Forward the email
In your webhook handler, use the Reloop API to send the email to the forwarding address:
import { Reloop } from 'reloop';
const reloop = new Reloop(process.env.RELOOP_API_KEY);
async function handleWebhook(event) {
if (event.type === 'email.received') {
const email = await reloop.emails.receiving.get(event.data.email_id);
await reloop.mail.send({
from: 'forwarding@yourdomain.com',
to: 'destination@example.com',
subject: `Fwd: ${email.data.subject}`,
html: email.data.html,
});
}
}Learn More
Was this page helpful?
- Need help? Contact Support.
- Chat with Reloop developers on Discord.
- Check out our changelog.
- Questions? Contact Sales.
- LLM? Read llms.txt.