- telnet host-to-test 25 (connect to port 25 on mail server)
- HELO sending-host
- MAIL FROM: foo@foo.com
- RCPT TO: bar@bar.com
- DATA
- (enter one blank line after DATA)
- Subject: test
To: to-user
From: from-user
(enter one blank line after From:)
test text for email
. (enter a single period by itself on the last line) - QUIT
Read on for testing servers that use SMTP AUTH...
To test SMTP with SMTP AUTH (no TLS/SSL) from the command line:
First, use a Perl one liner to compute the Base64 encoded user ID and password needed to authenticate to the mail server. This requires the Perl MIME::Base64 module.
perl -MMIME::Base64 -e 'print encode_base64("00userid00password")'
The output looks something like this:
AHVzZXJpZABwYXNzd29yZA==
Copy the output string so it can be pasted into the AUTH step below.
- telnet host-to-test 25 (connect to port 25 on mail server)
- HELO sending-host
- AUTH PLAIN Base64-encoded ID/password
- MAIL FROM: foo@foo.com
- RCPT TO: bar@bar.com
- DATA
- (enter one blank line after DATA)
- Subject: test
To: to-user
From: from-user
(enter one blank line after From:)
test text for email
. (enter a single period by itself on the last line) - QUIT