How to view and send email using telnet

For troubleshooting email problems with HostPapa VPS hosting plans, it can be helpful to view and send email directly on the server via telnet.

Before you begin

The telnet client application is not installed by default on VPS servers. If you haven’t already installed it, log in to your server via SSH and run the following command:

yum install telnet
When the installation is finished, you’ll see a Complete! message.

Sending email via telnet

Note: In each example, replace mydomain.com with your domain name.

From a command prompt on your local computer, enter the following command to connect to your server on port 25, which is used for outgoing email:

telnet mydomain.com 25

Now type helo to begin communicating with the mail server:

helo

Next, enter your email address:

mail from: myemail@mydomain.com

Enter the recipient’s email address:

rcpt to: user@gmail.com

To write the email message, type data, then the subject and message body. To end the email message, type a period (.) on a line by itself and press Enter:

data
Subject: Test email

Hi,

This is a test message.

Regards,
Me
.

Type quit to end the telnet session.

quit

Reading email via telnet

Note: In each example, replace mydomain.com with your domain name.

From a command prompt on your local computer, enter the following command to connect to your server on port 110, which is used to retrieve email:

telnet mydomain.com 110

Now type user and your email address:

user username@mydomain.com

Type pass followed by your password:

pass yourpassword

Type list to display a list of your emails. The emails will have numeric labels:

list
+OK POP3 clients that break here, they violate STD53.
1 897
2 5136
3 1884
4 2973
.

To read an email message, type retr and the number of the message. For example, to read the message labeled 2 5136, type retr 2:

retr 2

To delete an email message, type dele and the number of the message:

dele 1

Type quit to end the telnet session.

quit

More information

If you have any questions or need help, you can always contact HostPapa Support by opening a support ticket. Details about how to open a support ticket are here.

Related Articles

Get online with our affordable web hosting

Get online with our affordable web hosting

Learn more now
HostPapa Mustache