How to send SMTP email using Telnet

How to send SMTP email using Telnet

This is an old method of sending email using Telnet.  I’ve posted it here mostly for a remider to me on exactly how to do this, but thought I would share it with others who may not know of this.  This can be useful when testing if a server can successfully send email.  For example, I use this to confirm if a SharePoint server can successfully send emails for alerts and notifications.

Important: If you make any typing errors and use the backspace button to correct them, your command will return as invalid or as an error.  Therefore, you must type each command exactly – without any errors or corrections.

The items in bold are what you should type.

Start a Telnet session from a command line by entering:
Telnet your.mailserver.com 25

220 a.mail.server.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.2499 ready at  Thu, 29 Jun 2006 15:59:02 -0600
helo

250 a.mail.server.com Hello [192.168.125.237]
mail from: fromemail@server.com

250 2.1.0 email@server.com…Sender OK
rcpt to: joe@server.com

250 2.1.5 joe@server.com
data

354 Start mail input; end with .
This is a test.
.  (enter a dot/period to end the data)

250 2.6.0 Queued mail for delivery

quit
Connection to host lost.

Advertisements

One thought on “How to send SMTP email using Telnet

  1. Can you please tell me is there any way to send the attachment with mail using telnet commands,

    We were making use of mail server but while sending mail it is asking for authentication,that i have to provide network credential if don’t give then it was throwing me the error 504 5.5.2 reuires fully qualified host name or 550 5.7.1 unable to relay error. So i switched to telnet which sends mail without any problem.
    So wats the difference between using telnet so send mail and using Smtp server(system.web.mail) to send mail.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s