POP3


Post Office Protocol (POP3)

A user may have an email account; each email account is associated with a mail server. POP3 is used to retrieve email from a mail server. For instance, Outlook Express, Windows Live Mail or Thunderbird can connect to a mail server and retrieve emails. Thus, SMTP is used to move email from the client to the mail server, and POP3 is used to move email from the mail server to the client. POP3 usually works on port 110.
Un usuario puede tener una cuenta de correo electrónico, cada cuenta de correo está asociada con un servidor de correo. POP3 es usado para retraer correo electrónico desde un servidor de correo. Por ejemplo, Outlook Express, Windows Live Mail o Thunderbird pueden conectarse a un servidor de correo y retraer correos electrónicos. Así, SMTP es usado para mover correo electrónico desde el cliente hacia el servidor de correo, y POP3 es usado para mover correo electrónico desde del servidor de correo hacia el cliente. POP3 usualmente trabaja en el puerto 110.

Tip
The figure below shows how POP3 operates. First, the client sends the USER and PASS commands to connect to the POP3 server. Second, the client executes a LIST command to retrieve the list of emails; this command also returns the size of each email. The client may optionally use RETR and a number to retrieve a specific email from the list; the server sends a dot to indicate the end of the email. Finally, the client may send a QUIT command to terminate the connection.
La figura de abajo muestra cómo opera POP3. Primero, el cliente envía los comandos USER and PASS para conectarse al servidor de POP3. Segundo, el cliente ejecuta un comando LIST para retraer la lista de correos electrónicos; este comando también regresa el tamaño de cada correo electrónico. El cliente puede opcionalmente use RETR y un número para retraer un correo electrónico específico de la lista; el servidor manda un punto para indicar el final del correo electrónico. Finalmente, el cliente puede enviar un comando QUIT para terminar la conexión.

pop3

Problem 1
Create a program called MailClient to retrieve email from a POP3 server using sockets. Use a list view control to display the email list. When the user double clicks on the list view, the email opens in a Message Box.
Cree un programa llamado MailClient para retraer correo electrónico desde un servidor de POP3 usando sockets. Use un control de list view para mostrar la lista de correos electrónicos. Cuando el usuario hace doble clic en la list view, el correo electrónico se abre en una caja de mensajes.

MailClientRun

MailClient.cpp
...

void MailClient::Window_Open(Win::Event& e)
{
     Sys::Socket skt;
     wstring output;
     ...

     //_________________________________________________________________ CONNECT
     ...

     //__________________________________________________________________ USER
     ...
     //__________________________________________________________________ PASS
     ...

     //__________________________________________________________________ LIST
     ...

     for(int i = 0; i < messageCount; i++)
     {
          //_______________________________________________________________ RETR
          ...
     }
     tbxOutput.Text = output;

     //_______________________________________________________________________ QUIT
     ...

     skt.Close();
}

© Copyright 2000-2021 Wintempla selo. All Rights Reserved. Jul 22 2021. Home