I wanted to write a simple mail program, but could not. In the WinSock help it describes weakly. Where there is a description, manual or sample how to send the letter (simple text, without pictures), how to view the list of the incoming letters and how to accept them? Thanks to everybody who help me. Mike.
You'll have to take a look at the mail protocols, POP3 and SMTP. Search for both at rfc-editor.org. The protocols are quite simple and fully text based. It's too much to explain here but a simple example of sending a mail: (> is outgoing, < is incomming) connect to SMTP server on port 25 <220 blah server blah >HELO yourhostiporsomehthingelse <250 servername Hello .... >MAIL FROM: email@example.com <250
is syntactically correct
>RCPT TO: firstname.lastname@example.org
<250 is syntactically correct
<354 Enter message, ending with "." on a line by itself
>To: someone else
>Subject: test mail
>Here's your mail.
<250 OK id=2321218392892
The first three numbers of every repsonse indicate the success or failure of a command. The text after the number can be anything, you can't rely on that (but that just makes it easier).
If you want to read your mail, you will have to code an application that uses the POP3 protocol. Your application should connect to a pop3 server, then send commands like USER (to login to the server), PASS (to send a password) or RETR (to retrieve mail). All the commands are described in the POP3 RFC (you can find it at www.ietf.org) To send mail, you will have to use the SMTP protocol. Good luck!
There is a full program which demos use of winsock and sending email with code on my site (Simple Mailer) http://james.ezylink.net.au James