Backports for Debian GNU/Linux Version 10.x, Codename Buster (Howto install?)
Build because swaks in Buster doesn't know --attach-body
swaks (20190914.0-1+slashproc10+1) - SMTP command-line test tool
Binary for arch all (96.5 KB)

swaks (Swiss Army Knife SMTP) is a command-line tool written in Perl for testing SMTP setups; it supports STARTTLS and SMTP AUTH (PLAIN, LOGIN, CRAM-MD5, SPA, and DIGEST-MD5). swaks allows one to stop the SMTP dialog at any stage, e.g to check RCPT TO: without actually sending a mail.

If you are spending too much time iterating "telnet foo.example 25" swaks is for you.