Skip to content

SMTP Ingest

SeeSee includes a built-in SMTP server powered by aiosmtpd. Instead of integrating the REST API, you can point your application’s SMTP settings at SeeSee and it will capture every outgoing email automatically.

How it works

  1. Your app sends email via SMTP to SeeSee (default port 2525)
  2. SeeSee authenticates the connection using per-app SMTP credentials
  3. The MIME message is parsed — subject, addresses, HTML body, text body are extracted
  4. The email is stored in the database, respecting the app’s body storage mode
Your App → SMTP (port 2525) → SeeSee → Database

Setup

1. Enable SMTP

SMTP is enabled by default. Verify with:

Terminal window
SEESEE_SMTP_ENABLED=true # default
SEESEE_SMTP_PORT=2525 # default

Make sure port 2525 is exposed in your Docker setup:

Terminal window
docker run -p 8080:8080 -p 2525:2525 ...

2. Create an app

Each app gets unique SMTP credentials on creation:

Terminal window
curl -X POST http://localhost:8080/api/v1/apps \
-u admin:your-password \
-H "Content-Type: application/json" \
-d '{"name": "My App"}'

Save the smtp_username and smtp_password from the response — they’re shown once.

3. Configure your app’s SMTP settings

Point your application at SeeSee:

SettingValue
SMTP HostYour SeeSee server IP or hostname
SMTP Port2525
Usernamesmtp_username from app creation
Passwordsmtp_password from app creation
EncryptionNone (for internal/local use)
AuthRequired (LOGIN or PLAIN)

Client configuration examples

Generic SMTP settings

Host: seesee.example.com
Port: 2525
Username: my-app
Password: (smtp password from app creation)
Auth: LOGIN or PLAIN
TLS: None (use a reverse proxy for TLS)

Python (smtplib)

import smtplib
from email.mime.text import MIMEText
msg = MIMEText("Hello from Python!")
msg["Subject"] = "Test Email"
msg["From"] = "app@example.com"
msg["To"] = "user@example.com"
with smtplib.SMTP("seesee.example.com", 2525) as server:
server.login("my-app", "smtp-password-here")
server.send_message(msg)

PHP (mail function with SMTP)

Using PHPMailer (most common PHP SMTP library):

use PHPMailer\PHPMailer\PHPMailer;
$mail = new PHPMailer(true);
$mail->isSMTP();
$mail->Host = 'seesee.example.com';
$mail->SMTPAuth = true;
$mail->Username = 'my-app';
$mail->Password = 'smtp-password-here';
$mail->Port = 2525;
$mail->SMTPSecure = false;
$mail->SMTPAutoTLS = false;
$mail->setFrom('app@example.com', 'My App');
$mail->addAddress('user@example.com');
$mail->Subject = 'Test Email';
$mail->Body = '<h1>Hello!</h1>';
$mail->AltBody = 'Hello!';
$mail->send();

Node.js (Nodemailer)

const nodemailer = require("nodemailer");
const transporter = nodemailer.createTransport({
host: "seesee.example.com",
port: 2525,
secure: false,
auth: {
user: "my-app",
pass: "smtp-password-here",
},
});
await transporter.sendMail({
from: "app@example.com",
to: "user@example.com",
subject: "Test Email",
text: "Hello from Node.js!",
html: "<h1>Hello from Node.js!</h1>",
});

Troubleshooting

Connection refused

  • Verify port 2525 is exposed: docker run -p 2525:2525 ...
  • Check that SEESEE_SMTP_ENABLED=true
  • If connecting from another container, use the host IP or Docker network name, not localhost
  • Check firewall rules allow connections on port 2525

Authentication failed

  • SMTP credentials are per-app — make sure you’re using the right app’s credentials
  • Credentials are shown only once at app creation. If lost, create a new app
  • SeeSee supports LOGIN and PLAIN auth mechanisms

Emails not appearing

  • Check SeeSee logs for parsing errors: docker logs seesee
  • Verify the SMTP user/password match a registered app
  • Check the app’s body_storage_mode — in preview mode, bodies are truncated to 500 characters