Tomas' Labroratory

Automating SMTP testing with nc

Piping SMTP commands directly into nc doesn't work very well. What's needed is a pause before each command. Something like this

cat "mail.txt" |while read L; do sleep "1"; echo "$L"; done | "nc" -C -v "smtp.example.com" "25"