Howto Telnet SMTP

Author: Johannes Findeisen - 2004-06-26

Table of contents

  1. Open Connection
  2. Declare where you are sending from
  3. Set the sender
  4. Set the recipient
  5. Start composing the message
  6. Start writing content in the message
  7. Sending the message

1. Open connection

Command:

[hanez@phantom ~]$ telnet mail.domain.tld 25

You should normally receive something like this:

Trying 000.000.000.000...
Connected to mail.domain.tld.
Escape character is '^]'.
220 mail.domain.tld ESMTP

2. Say hello

Command:

HELO local.domain

Answer (normally):

250 mail.domain.tld

3. Set the sender

Command:

MAIL FROM: user@domain.tld

Answer (normally):

250 OK

4. Set the recipient

Command:

RCPT TO: user@domain.tld

Answer (normally):

250 OK

5. Compose the message

Command:

DATA

Answer (normally):

354 go ahead

6. Start writing content in the message

Insert data:

Subject: "Hello World!"

Hello World,

what's up?

7. Sending the message

Enter a new line after the last word you have written. Add only a . (dot) to this line. Hit enter.

.

If everything was ok you should receive a message like this and the mail should be sent:

250 ok 1090795155 qp 29731

Comments

Please enter your comment here:




Security check, please solve:

PIT         NFL      
  Q    T      T   NUE
  8   CI7     F      
  2    Q      P   TF6
  9           Q      

Previous comments:

2008.07.30 - 13:05:50 - fdfdf

fdfdfdfsdf

2008.07.30 - 13:05:33 - fdfdf

fdfdfdfsdf

$Date: 2006-11-28 17:00:44 +0100 (Tue, 28 Nov 2006) $