Create a simple test file to verify your installation:
1
Create a test file
Create a new file called test.ts:
test.ts
import { Fumi } from "@puiusabin/fumi";const app = new Fumi({ authOptional: true });app.onConnect(async (ctx, next) => { console.log(`Connection from ${ctx.session.remoteAddress}`); await next();});console.log("Starting Fumi SMTP server on port 2525...");await app.listen(2525);console.log("Server is running!");
2
Run the test server
Run your test file with Bun:
bun test.ts
You should see:
Starting Fumi SMTP server on port 2525...Server is running!
3
Test the connection
In another terminal, test the server with telnet:
telnet localhost 2525
You should receive a 220 banner response from the SMTP server. Type QUIT to close the connection.
If you see “Connection from 127.0.0.1” in your server logs, your installation is working correctly!
Fumi is written in TypeScript and includes complete type definitions. No additional @types packages are needed.For the best development experience, ensure you have TypeScript 5 or higher: