Testing with Telnet: Sent a mail using command line
You can also use TELNET to test your SMTP service. SMTP uses port number 25,so in order to use telnet to open an SMTP session with the command
telnet abc.test.com 25 or telnet 192.168.10.17 (EX:IP of smtp server space and port number)
If the connection is successful, we should see a banner and a command line interface.We then need to follow RFC 821 for the accepted SMTP commands, which are quite simple(as the name says...)
220 abc.test.com Microsoft ESMTP MAIL Service, Version: 5.0.2195.5329 ready at Mon,25
Nov 2002 02:51:06 +0200
helo abc.test.com or helo 192.168.10.17 (EX:ip address of smpt or name)
250 abc.test.com Hello [192.168.0.100]
mail from:admin@gmail.com or mail form zyz (Ex:can specify mail id or name)
250 2.1.0 admin@gmail.com....Sender OK
rcpt to:testmailid@gmail.com (mail id to whom you want to send)
250 2.1.5 testmailid@gmail.com
data
354 Start mail input; end with .(Means once you done with matter then press enter and .(dot) to finish)
subject: this is a test
Hi John
I'm trying to test this connection from Telnet.
Let me know if you get this message.
. (this dot will end of your mail matter)
=========================
options to send mail
=========================
telnet [-a][-e escape char][-f log file][-l user][-t term][host [port]]
-a Attempt automatic logon. Same as -l option except uses
the currently logged on user's name.
-e Escape character to enter telnet client prompt.
-f File name for client side logging
-l Specifies the user name to log in with on the remote system.
Requires that the remote system support the TELNET ENVIRON option.
-t Specifies terminal type.
Supported term types are vt100, vt52, ansi and vtnt only.
host Specifies the hostname or IP address of the remote computer
to connect to.
port Specifies a port number or service name.
You can also use TELNET to test your SMTP service. SMTP uses port number 25,so in order to use telnet to open an SMTP session with the command
telnet abc.test.com 25 or telnet 192.168.10.17 (EX:IP of smtp server space and port number)
If the connection is successful, we should see a banner and a command line interface.We then need to follow RFC 821 for the accepted SMTP commands, which are quite simple(as the name says...)
220 abc.test.com Microsoft ESMTP MAIL Service, Version: 5.0.2195.5329 ready at Mon,25
Nov 2002 02:51:06 +0200
helo abc.test.com or helo 192.168.10.17 (EX:ip address of smpt or name)
250 abc.test.com Hello [192.168.0.100]
mail from:admin@gmail.com or mail form zyz (Ex:can specify mail id or name)
250 2.1.0 admin@gmail.com....Sender OK
rcpt to:testmailid@gmail.com (mail id to whom you want to send)
250 2.1.5 testmailid@gmail.com
data
354 Start mail input; end with .(Means once you done with matter then press enter and .(dot) to finish)
subject: this is a test
Hi John
I'm trying to test this connection from Telnet.
Let me know if you get this message.
. (this dot will end of your mail matter)
=========================
options to send mail
=========================
telnet [-a][-e escape char][-f log file][-l user][-t term][host [port]]
-a Attempt automatic logon. Same as -l option except uses
the currently logged on user's name.
-e Escape character to enter telnet client prompt.
-f File name for client side logging
-l Specifies the user name to log in with on the remote system.
Requires that the remote system support the TELNET ENVIRON option.
-t Specifies terminal type.
Supported term types are vt100, vt52, ansi and vtnt only.
host Specifies the hostname or IP address of the remote computer
to connect to.
port Specifies a port number or service name.