C # Builder monitors POP3 mailboxes

Source: Internet
Author: User
Borland's C # Builder is a programming tool based on the C # language. C # Builder allows developers to develop it using Java or CORBA tools, C # Builder also has the ability to read data from a variety of databases, and can mix and adapt to different development standards. This article describes how to use Borland C # Builder to write a mailbox monitoring program. The program mainly uses WinSock for network communication. To implement this program, you should have a certain understanding of the POP3 protocol. The following is a rough introduction to the POP3 protocol. For more information, see RFC 1225.
I. INTRODUCTION to POP3 protocol
POP3 server programs provide services on TCP port 110. When the customer wants to use the service, it establishes a TCP connection with the server. Once the connection is established, the POP3 server sends a welcome message to the customer. Then the customer starts to send commands to the server, and the server gives the corresponding answer. POP3 commands consist of a keyword or a keyword plus a parameter. Each command uses a carriage return line break (0xD0xA) as the end flag. The POP3 server provides an answer for all commands. A server's answer consists of a status sign and additional information. The two currently used symbols are "+ OK" and "-ERR", respectively indicating whether the customer's command is legal. All the Answers also end with a carriage return. The four POP3 commands related to the topics discussed in this article are USER, PASS, STAT, and QUIT.
USER command
Format: USER name
Name indicates the user ID on the POP3 server. The customer should be able to send this command after receiving a welcome message from the server or after the previous USER or PASS fails.
PASS command
Format: PASS string
String indicates the password of the user. The customer can send this command only after sending the USER command and receiving the + OK response. If both the user name and password are correct, the server replies + OK, otherwise-ERR.
STAT command
Format: STAT
STAT command to view the mailbox information. The STAT command responds with two numbers, indicating the number of mails and the size of mails, respectively.
QUIT command
Log out from the POP3 server.
2. Monitoring program analysis of POP3 mailbox
The program we prepare should implement the following functions:
1. The program runs as soon as the tray icon is displayed. Right-click the tray icon to bring up the menu.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.