Skip to content
Rasel MailHelp center
Categories and guides
For developers

Download and run the sending and OAuth examples

A dependency-free Node.js project with isolated tests and bilingual instructions.

Editorial update: October 30, 2026
In this guide

What is included?

The archive contains a sending/status CLI, a localhost OAuth demo, Arabic/English instructions and tests. It contains no real secrets or messages. Version metadata ties the download to its build source and checksum.

1. Extract and run the tests

Use Node.js 22.13 or newer. Extract the archive, open rasel-integrations in a terminal and run npm test. No npm install is needed; examples use the Node standard library. Tests use local mocks and never send real email.

Inside the example folder
npm test

2. Send one business event

  1. Copy .env.example to .env and message.example.json to message.local.json.
  2. Set the project key in .env and replace addresses with your project-domain sender and test recipient.
  3. Run send, then query the returned ID. Retain the event identity when a response is lost.
Send and inspect
node --env-file=.env send.mjs send order-123-confirmation message.local.json
node --env-file=.env send.mjs status RETURNED_MESSAGE_UUID

The example stores only event identity, body hash and ID and rejects changed contents under an event. It does not automatically resend unknown. After a forced process termination, follow the README lock-recovery instructions before removing any leftover lock.

3. Try consent, reading and revocation

  1. Register an OAuth app with exactly http://localhost:4318/callback.
  2. Set client ID and secret in .env and run npm run oauth.
  3. Open http://localhost:4318 and connect. Approve in Rasel Mail and read the authorized mailbox metadata.
  4. Try revocation. If remote revocation fails, the demo tells you to revoke from Applications.

Before production use