Java Graphical Interface mail system

Source: Internet
Author: User
Tags imap

The background of the mail system using Javagui programming to achieve, so that we can directly control the desktop mail messaging function.

First, to achieve the login function of the mailbox

The messaging system uses the SMTP protocol to send messages, using the POP3 protocol or the IMAP protocol to collect messages. SMTP belongs to push protocol, POP3, IMAP belongs to pull protocol.

e-Mail login in order to log in to get the mailing list, we use the POP3 protocol to log in the mailbox.

(If you use the SMTP protocol login, can only verify the account, the password is correct, can not get the mailing list, log in and then use the POP3 protocol to get mail, the opposite ~ ~ ~)

The POP3 protocol does not directly verify the function of the account, but if you log in with an incorrect mailbox, an exception is thrown, so we use exception capture to determine if the account password is correct.

After successful login, we use POP3 verified successful account to get the mailing list and display it on the panel.

Two Get mailing list

When the login verification is successful, we retrieve the message from the server in the background and store it in the message model array, and then transfer the data to the login interface.

One problem with this process is that when a mailbox list is long, the background takes a long time to get the mailing list.

Workaround: 1. Only the most recent 30 messages are available.

2. If you want to get all, and at the same time the mailing list is longer, we first get the latest 30 messages, the data is passed to the main mailbox interface, and then after entering the main interface of the mailbox and then in the background to get the remaining messages.

        

  

Java Graphical Interface mail system

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.