below is the example on how test connection to smtp server
# telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is ''^]''. 220 mail.xpr.org ESMTP mail from: imran@xpr.org 250 ok rcpt to: am3n@xpr.org 250 ok data 354 go ahead Subject: Testing first time test test . 250 ok 1103635217 qp 16177 quit 221 mail.xpr.org Connection closed by foreign host.