www.michalscorner.com what I have recently discovered

10Feb/110

smtp: test smtp with telnet

login to smtp server
telnet smtp.example.com 25

if your server requires authentication you may want to check what are the supported methods in this case it's plain and login
ehlo
250-ssmtp.example.com Hello [10.20.30.40]
250-SIZE 52428800
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP

note that both of the methods PLAIN and LOGIN accepts base64 encoded data. In this example I will use LOGIN
AUTH LOGIN
334 VXNlcm5hbWU6
ZXhhbXBsZUBleGFtcGxlLmNvbQ==
334 UGFzc3dvcmQ6
eW91clBhc3N3b3JkRm9yRXhhbXBsZS5jb20=

you should receive
235 Authentication succeeded

now prepare email
mail from:example <[email protected]>

output
250 OK

set recipient
rcpt to: Test <[email protected]>

output
250 Accepted

provide email data
DATA

output
354 Enter message, ending with "." on a line by itself

enter data
From: Example <[email protected]>
To: Test <[email protected]>
Subject: This is a test message

This is test message body.

.

you should receive something similar
250 OK id=1PnVNN-000597-V0

you may now close telent connection
QUIT