Replit Integration
Configure environment variables in Replit Workspace to send emails using Reloop.
Replit is an online IDE and hosting service. Follow these steps to configure your Replit Repl to send emails via Reloop.
Step 1: Add API Key to Replit Secrets
- Open your Repl workspace on Replit.
- Click on the Secrets tool in the left sidebar (represented by a lock icon).
- Add a new secret:
- Key:
RELOOP_API_KEY - Value:
rl_your_api_key_here
- Key:
- Click Add Secret.
Replit automatically injects secrets as environment variables.
Step 2: Write Email Dispatch Logic
Send an email in Node.js on Replit:
import Reloop from 'reloop-email';
const reloop = new Reloop(process.env.RELOOP_API_KEY);
reloop.emails.send({
from: 'hello@yourdomain.com',
to: 'friend@example.com',
subject: 'Greetings from Replit',
html: '<p>This was sent from my online Repl!</p>'
});Was this page helpful?