Recent Changes - Search:

Softwares

.

Sending-Mail-Via-Telnet-to-Port-25-to-Test-SMTP-Communication


  • Reference : http://www.ietf.org/rfc/rfc2821.txt
  • Make sure that the host from which you are trying to do telnet can connect to the server.
  • Connect to the internet.
  • Step 1 telnet itmission.org 25
  • Enter the following command to connect to the mail server using telnet command.
  • Below definitely see the '220' part. It is an indication that the server is ready to service your request.
  • Step 2 Now the server expects you to identify yourself- here you need to enter your hostname if you are using dialup connection or if you have a domain name then your domain name.

EHLO shibu-laptop

  • We need to tell the server our name and the server will return back to us with his name :)

250-earth.assuredhost.com Hello shibu-laptop [xx.xx.xx.xxx]

  • step 3 Next give the server your e-mail address.

MAIL FROM:shibucv@shibu-laptop.com

  • Step 4Tell the server who you want to send the e-mail to.

rcpt to: info@aol.com

  • Step 5 Use data command to type in the email
  • Step 6When you finish your e-mail, press [ENTER], then a '.'(dot), and again an [ENTER]. This tells the server that you have finished the e-mail, and it can send it.
  • Step 7Send another mail using RCPT command and DATA command with the same connection or quit using QUIT command.
  • Please see some commands have not be run below.

shibu@shibu-laptop:~$ telnet itmission.org 25
Trying 209.67.221.77...
Connected to itmission.org.
Escape character is '^]'.

help
220-earth.assuredhost.com ESMTP Exim 4.68 #1 Wed, 30 Jan 2008 07:23:09 -0800
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
214-Commands supported:
214 AUTH STARTTLS HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP

EHLO shibu-laptop

250-earth.assuredhost.com Hello shibu-laptop [xx.xx.xx.xxx]
250-SIZE 52428800
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP

MAIL FROM:shibu-laptop.com
501 shibu-laptop.com: sender address must contain a domain

MAIL FROM:shibucv@aol.com
250 OK

quit

221 earth.assuredhost.com closing connection
Connection closed by foreign host.
shibu@shibu-laptop:~$ 

Edit - History - Print - Recent Changes - Search
Page last modified on April 12, 2009, at 08:50 AM