Sender (c) 1999-2001 by Iwik
----------------------------
EXAMPLES OF USE SENDER
----------------------------

Contents:
I.    Usefull things
II.   Sending a mail (SMTP Protocol)
III.  Receiving a mail (POP3 Protocol)
IV.   HTTP 1.0 - GET


I. Usefull things
----------------------------------
Sometimes maybe you will need to send at once more lines. In this case, use
\n for new line and \r now carriage return.


II. Sending a mail (SMTP Protocol)
----------------------------------
How to send a mail - how SMTP works ?
First, set up sender. In "IP setup" (Alt+S) fill IP address of SMTP server.
(If you don't know what is it, won't read this example, and delete sender, it
is NOT usefull for you!), If you don't know any, use "smtp.atlas.cz". SMTP is 
using port 25, so fill port box (double click this box will show you services
help). Press "OK" and now click connect button (or press ALT+C). On, connect 
you should receive message like this 

R: 220 Proxy+ SMTP server at mailproxy.
|   |  |
|   |  |- Name of SMTP server, in this case it's proxy smtp server
|   |- Successfull, 2xx means all ok
|- Means it was received message (this is added by sender)

By SMTP specification we have to now send HELO command, so write
HELO <your_computer_name>. And you seee

S: HELO stupid
|  |
|  |- no need to explain :)
|- Means it was sended message

And you see

R: 250 mailproxy

So, all it's ok, so we continue, with MAIL FROM: <user@host>. This address may be FAKE!!!
It depends on server settigs, corrcectly set up server will NOT allow you to use not exist
domains, etc. As exmple, I'll use bill@microsoft.com

S: MAIL FROM: bill@microsoft.com
R: 250 OK <bill@microsoft.com>

We continue with recipient, RCPT TO: <user@host>

S: RCPT TO: iwik@iwik.sk
R: 250 OK <iwik@iwik.sk>

All, OK, so we continue with DATA

S: DATA
R: 354 Start mail input. End with <CRLF>.<CRLF>

Now, the e-mail message starts, so everything we write now will be in the message.

S: This is only a test, to explain...

To end message use "." on the line (as said server too)

S: .
R: 250 Accepted for delivery

All done, so QUIT

S: QUIT
R: 221 mailproxy closing connection

The message is send, and this is end of part II.

NOTE: You can type HELP to see available commands and parameters, try it!



III.  Receiving a mail (POP3 Protocol)
-------------------------------------

Set up Sender, IP port is 110 for POP3.
Now connect to server. 

R: +OK Proxy+ POP3 server ready <620.19677074@mailproxy>

Now send your username, USER <username>

S: USER admin
R: +OK Enter your password

Enter a password with pass <password>

S: PASS <censored :))>
R: +OK user authorized. You have 1 messages (342 bytes)

We have a mail! Use RETR <message_number> to retrieve it.

S: RETR 1
R: <message will be here>

When we have more messages in mailbox, or we want to their size, usefull 
commands are LIST and STAT

S: STAT
R: +OK 1 342

S: LIST
R: +OK scan listing follows
R: 1 342
R: .

Now, we delete the message with DELE command.

S: DELE 1
R: +OK mesage 1 was deleted

That's all, QUIT

S: QUIT
R: +OK Proxy+ POP3 server signing off

Part III ends.


IV. HTTP 1.0 - GET
------------------

Very, very simple example of HTTP protocol. Select port 80 and enter name of some
web server, eg. www.iwik.sk at "IP setup". 
Connect and send

S: GET \ HTTP/1.0
S: 
   |
   |- this means clear line, just press eneter

And you will receive the main web page (typicaly index.html)

R: HTTP/1.1 200 OK
Date: Mon, 30 Jul 2001 14:30:45 GMT
Server: Apache/1.3.14 (Win32) PHP/4.0.4pl1
X-Powered-By: PHP/4.0.4pl1
Connection: close
Content-Type: text/html

<Html>
<Head>
<Title>.:- iwik home page -:.</Title>
<Meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<Script LANGUAGE="JavaScript">
.
.
.
.
Page continue
.
.
.
.
</Body>
</Html>

And connection will be terminated. 

Now, sender will act as a server. Click "Listen" (Alt+L) and open your web 
browser and type 127.0.0.1 in it.

You will see something like this

Accepting connection from 127.0.0.1 at port 80

R: GET / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel,application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: sk
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Host: voyager
Connection: Keep-Alive
Cookie: login2452110.1406=07-29-2001%2006%3A22%20PM&2452120.1822

All what you write now will be sent to web browser. Write something and 
disconnect. You will see it in browser.

Part IV ends.

--

That's ALL. Hope you enjoy/like it. Cause i was very happy when i fist tried 
this things :)
If you want know more, search for RFCS 1725 (POP3 protocol), 821 (SMTP).
Bye, Iwik [web: http://www.iwik.sk, e-mail: sender@iwik.sk] 

30. 7. 2001 16:42

PS: sorry my english






















 


