telnet connection to outgoing SMTP server
To connect to an SMTP server by using Telnet on port 25, you need to use the fully-qualified domain name (FQDN) (for example, ...
Most likely, your ISP is blocking outgoing connections on port 25. Many ISP's do this to prevent spammers from running mail servers on their networks. Can you connect to any SMTP server on port 25? Have you tried connecting to smtp.gmail.com on port 587 instead?
How Do I Test SMTP Using Telnet Authentication?
Now that you know how to check an SMTP connection with telnet, we’ll discuss authentication procedures. SMTP authentication helps prevent large amounts of spam from reaching reader inboxes, though not all mail exchange servers require it.
The primary difference in modern authentication protocols is the presence of a base64 encoding. Base64 converts binary data into the ASCII-text format required by mail servers for successful data transmission. It’s a way of representing your login credentials — some combination of text — in numeric format the computer can understand.
You can generate your base64 using software or free online tools. Once you communicate the information to the mail server, it compares this data with its records to determine authentication.
To test SMTP authentication via telnet, complete the following steps:
- Open the terminal and connect with the mail server using the telnet server name and access command — mail.port25.com in the example above.
- Greet the server with EHLO or HELO, enter AUTH LOGIN, and wait for the computer’s response.
- Enter the base64-encoded user name and allow the server to answer.
- Enter the password encoded in base64, and you should receive a response such as “authentication succeeded.”
- Proceed with MAIL FROM, RCPT TO, DATA, and QUIT to send your authenticated email.
Click Here to Visit