POP pseudo code protocol

establish connection

C: Hello, I would like to start a POP session.
S: OK, I am a POP server running at xxx.xxx.xxx.
C: I am Outlook Express running at yyy.yyy.yyy.

Loop until a valid user name is entered:
   S: What is your user name?
   C: I am user xxx.
   S: If invalid name, send error message.
End of loop

Loop until the correct password is entered:
   S: What is your password?
   C: My password is xxx.
   S: If incorrect password, send error message.
End of loop

S: You have xxx new messages.
S: Would you like to see headers only or the entire messages?
C: Reply "headers" or "messages."

If reply is "headers"
   S: Send headers
Otherwise
   S: Send messages
End if

C: I got them, Goodbye.
S: Goodbye.

end connection

Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.