swaks

The SMTP swiss army knife: one command that prints the whole conversation.

1Install it

# macOS
brew install swaks

# Debian / Ubuntu
sudo apt install swaks

2Send a test message

Your sandbox credentials
swaks --server smtp.mailclutch.com --port 587 -tls \
  --auth LOGIN \
  --auth-user "mc_0000000000000000" \
  --auth-password "pw_0000000000000000" \
  --from staging@example.com \
  --to anyone@example.com \
  --header "Subject: Sandbox check" \
  --body "Hello from swaks."

Every line of the exchange is printed, so a rejection tells you which command it failed on.

Watch it land

Open the sandbox and the message is there — rendered HTML, plain text, raw source, attachments, and the SPF, DKIM and DMARC verdicts. It updates live, so you can leave it open next to your terminal.

Nothing is ever delivered onward, whatever address you send to; claim the sandbox with an account and it stays.

Awaiting your email

Send from any address; it stops here rather than going onward. The sandbox keeps what it catches for 24 hours.

Go further

  • -tls vs -tlsc

    -tls is STARTTLS, for ports 25, 587, 2525. -tlsc is implicit TLS, for 465.

Official documentationswaks (opens in a new tab)