SMTP using netcat
2026-01-20
smtp
netcat
telnet
Commands don’t need to be upper case.
The
mail from:address needs to be in RFC format. Some servers will accept anything though.Some servers (Gmail) require data headers such as
From:.Starting netcat with
-CsendsCRLFline feeds which may be required.
$ nc smtp.example.com 25
220 smtp.toennjes.dev ESMTP Postfix (Debian)
EHLO marvin.yelnah.org
MAIL FROM: <felix@userspace.com.au>
RCPT TO: <recipient@example.com>
DATA
Subject: test01
From: felix@userspace.com.au
To: recipient@example.com
Blah blah
.
QUIT