[Node.js SDK]
Elysia
Send transactional email from Elysia routes on Bun with the official Node.js SDK.
1
Install the Node.js package
npm install reloop-email2
Send email from Elysia
send_email.ts
1import { Elysia } from 'elysia';2import Reloop from 'reloop-email';3
4const reloop = new Reloop(process.env.RELOOP_API_KEY);5
6const app = new Elysia()7 .post('/send', async () => {8 const { data, error } = await reloop.emails.send({9 from: 'Acme <onboarding@yourdomain.com>',10 to: ['delivered@yourdomain.com'],11 subject: 'Hello from Elysia',12 html: '<strong>It works!</strong>',13 });14
15 if (error) throw error;16 return { id: data.id };17 })18 .listen(3000);19
20console.log(`Listening on ${app.server?.hostname}:${app.server?.port}`);3
GitHub, examples, and API reference
4
Need more help?
- Need help? Contact Support.
- Chat with Reloop developers on Discord.
- Check out our changelog.
- Questions? Contact Sales.
- LLM? Read llms.txt.
Send with Elysia.
Get an API key and ship transactional email from Elysia using the official Node.js SDK.