Please answer briefly the following questions. Briefly means one paragraph at most. Usualy one or two sentences are enough.
Chapter 20 (pages 547-573): 2, 10, 12
Chapter 22 (pages 599-620): What is the difference between GET and POST?; What is the meaning of each range of HTTP server error/response status messages: 1XX, 2XX, 3XX, 4XX, 5XX?
Write a program in C or C++ that checks email using POP3 protocol. In case there is any email it downloads the Subject of the first message and deletes the message from the account. The subject should be printed on the screen. You can use your own account (be careful not to loose any email!) or use the account provided by the instructor (server name: gdansk.bradley.edu user: tnp, password tnpee). If you missed the lecture stop by the office to get the SMTP server name, POP server name, POP user ID and POP password for your experiments. You may but do not have to use the sample POP3 code that is posted in the examples section.
Hints: When retrieving e-mail use for example "RETR 1\r\n" and then read all lines until "." is receaved. Look for a line that starts with "Subject: " before thye first occurence of an emtpy line that partitions message header from its body. Do not print subject lines embedded inside a body. Handle cases when there is no subject line. In order to have some e-mail to work with send some messages to tnp@gdansk.bradley.edu. Assume that a few persons might work about at the some time so it might happen that you retrieve someone else's test messages or that your messages will be read by someone else.
In case of theoretical questions please attach your homework page as an ASCII text (*.txt) or Reach text *.rtf or MS Word 2007 *.docx document. Legacy MS Word files *.doc will not be opened. In case of programs attach all source code in files with proper names and extensions (*.c, *.cpp, *.h). Do not send compiled programs (*.exe) as email with such contents is automatically deleted. Send your homework via e-mail to the instructor at olekmali at bradley.edu. Please set the message subject to: tnp-hwN.
Thank you.