CN107104889A - A kind of rough draft mail synchronization method, device and terminal based on IMAP protocol - Google Patents
A kind of rough draft mail synchronization method, device and terminal based on IMAP protocol Download PDFInfo
- Publication number
- CN107104889A CN107104889A CN201710546713.1A CN201710546713A CN107104889A CN 107104889 A CN107104889 A CN 107104889A CN 201710546713 A CN201710546713 A CN 201710546713A CN 107104889 A CN107104889 A CN 107104889A
- Authority
- CN
- China
- Prior art keywords
- rough draft
- mobile terminal
- server
- uploaded
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/42—Mailbox-related aspects, e.g. synchronisation of mailboxes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
This application provides a kind of rough draft mail synchronization method, device and terminal based on IMAP protocol, when the rough draft mail of state to be uploaded in mobile terminal is uploaded to mail server, the mail piece identifier for the rough draft mail that mail server is returned is stored in first list;The mail piece identifier of the rough draft mail stored in mail server is stored in second list again;It is then determined that being stored in second list and being not stored in the targeted mails identifier of first list;And then rough draft mail corresponding with targeted mails identifier is downloaded to mobile terminal from the mail server.So, the rough draft mail synchronization in mobile terminal can either be uploaded to mail server, and the rough draft mail synchronization in other-end equipment can be downloaded to mobile terminal, to continue the rough draft mail for viewing or editing the download, Consumer's Experience is improved.
Description
Technical field
The application is related to field of e-mail, more particularly to a kind of rough draft mail synchronization method based on IMAP protocol, dress
Put and terminal.
Background technology
With widely available, the E-mail address based on mobile terminal of the mobile terminal devices such as smart mobile phone, tablet personal computer
Business is also able to extensive use.E-mail address user can complete checking and accepting, read, writing for Email on the mobile terminal device
Write, reply and forward, greatly improve work and the life efficiency of user.
Fig. 1 is a kind of network architecture schematic diagram of typical Email.As shown in figure 1, the network of Email
System includes multiple mail servers and the multiple terminal devices (such as PC, cell phone that are connected with each mail server
And ipad etc.).Terminal device both can be the transmitting terminal of mail or the receiving terminal of mail;Mail server both may be used
So that as transmitting terminal server, receiving terminal server can also be used as.The transmitting-receiving process of Email is as follows:It is used as transmitting terminal
Terminal device passes through smtp protocol (Simple Mail Transfer protocol, English full name:Simple Mail Transfer Protocol)
Mail is sent to transmitting terminal server, transmitting terminal server is again sent mail to receiving terminal server by smtp protocol,
It can pass through POP agreements (post office protocol, English full name as the PC terminals of receiving terminal:Post Office Protocol) or
IMAP protocol (Internet Mail Access Protocols, English full name:Internet Mail Access Protocol) read storage
In the mail of receiving terminal server, or, the email relaying server that is connected with receiving terminal server (part email relaying in figure
Server is not shown) mail that receives receiving terminal server by pushmail (mail push) technologies real time propelling movement to connecing
The mobile terminal of receiving end, so as to realize sending and receiving for Email.
At present, when Mail Clients uses IMAP protocol in mobile terminal, usual same by Email to be sent
Step is into the caching of mail server, and rough draft mail can not be synchronized between terminal device and mail server, thus
Bring problems with:Mobile terminal can not the rough draft mail that edits of synchronized upload, also can not synchronously download other-end equipment
Rough draft mail in (such as webpage version mailbox, the Mail Clients of other mobile terminals) is continued with, and this is undoubtedly to movement
The E-mail address user of terminal causes very big puzzlement.
The content of the invention
, can be by movement this application provides a kind of rough draft mail synchronization method, device and terminal based on IMAP protocol
Rough draft mail synchronization in terminal is uploaded to mail server, and can download the rough draft mail synchronization in other-end equipment
To mobile terminal.
In a first aspect, this application provides a kind of rough draft mail synchronization method based on IMAP protocol, applied to mobile whole
End, methods described includes:
When the rough draft mail of state to be uploaded in mobile terminal is uploaded to mail server, mail server is returned
The mail piece identifier of rough draft mail is stored in first list;
Obtain the mail piece identifier of rough draft mail stored in mail server, and the mail piece identifier is stored in the
Two lists;
Targeted mails identifier is determined, the targeted mails identifier is stored in second list, and is not stored in first row
Table;
Rough draft mail corresponding with the targeted mails identifier is downloaded to mobile terminal from the mail server.
Second aspect, present invention also provides a kind of sychronisation of the rough draft mail based on IMAP protocol, applied to shifting
Dynamic terminal, described device includes:
First memory module, for when the rough draft mail of state to be uploaded in mobile terminal is uploaded to mail server,
The mail piece identifier for the rough draft mail that mail server is returned is stored in first list;
Second memory module, the mail piece identifier of the rough draft mail stored for obtaining in mail server, and will be described
Mail piece identifier is stored in second list;
Determining module, for determining targeted mails identifier, the targeted mails identifier is stored in second list, and not
It is stored in first list;
Synchronization module, for rough draft mail corresponding with the targeted mails identifier to be downloaded from the mail server
To mobile terminal.
The third aspect, present invention also provides a kind of terminal device, the terminal device is included described in above-mentioned second aspect
Sychronisation.
The application's has the beneficial effect that:
This application provides a kind of rough draft mail synchronization method, device and terminal based on IMAP protocol, work as mobile terminal
In the rough draft mail of state to be uploaded when being uploaded to mail server, the mail piece identifiers for the rough draft mail that mail server is returned
Symbol is stored in first list;The mail piece identifier of the rough draft mail stored in mail server is stored in second list again;So
Determine to be stored in second list and be not stored in the targeted mails identifier of first list afterwards;And then will be identified with targeted mails
Accord with corresponding rough draft mail and be downloaded to mobile terminal from the mail server.So, can either be by the rough draft in mobile terminal
Mail synchronization is uploaded to mail server, and the rough draft mail synchronization in other-end equipment can be downloaded into mobile terminal,
To continue the rough draft mail for viewing or editing the download, Consumer's Experience is improved.
Brief description of the drawings
In order to illustrate more clearly of the technical scheme of the application, letter will be made to the required accompanying drawing used in embodiment below
Singly introduce, it should be apparent that, for those of ordinary skills, without having to pay creative labor,
Other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of network architecture schematic diagram of typical Email;
Fig. 2 is a kind of flow chart for rough draft mail synchronization method based on IMAP protocol that the embodiment of the present application one is provided;
Fig. 3 is a kind of flow chart for rough draft mail synchronization method based on IMAP protocol that the embodiment of the present application two is provided;
Fig. 4 is a kind of schematic diagram for Mail Clients draft that the embodiment of the present application two is provided;
Fig. 5 is the flow chart for the step S201 that the embodiment of the present application two is provided;
Fig. 6 is the flow chart for the step S2013 that the embodiment of the present application two is provided;
Fig. 7 is the flow chart for the step S2011 that the embodiment of the present application two is provided;
Fig. 8 is the flow chart that the mobile terminal that the embodiment of the present application two is provided creates scratch file clamping method;
Fig. 9 is that a kind of structure of the sychronisation for rough draft mail based on IMAP protocol that the embodiment of the present application three is provided is shown
It is intended to.
Embodiment
The synchronous method of rough draft mail provided herein is set up on the basis of IMAP protocol, utilizes IMAP protocol
Related command, realizes the communication between mobile terminal and mail server.The application can solve the problem that mobile whole by above method
The rough draft mail at end can not be synchronous with mail server technical problem, so that E-mail address user grasps on different terminal equipment
Make rough draft mail.The synchronous method of the rough draft mail provided below in conjunction with the accompanying drawings the application is described in detail.
It is a kind of stream for rough draft mail synchronization method based on IMAP protocol that the embodiment of the present application one is provided referring to Fig. 2
Cheng Tu.From Figure 2 it can be seen that comprising the following steps:
Step S101:When the rough draft mail of state to be uploaded in mobile terminal is uploaded to mail server, mail is taken
The mail piece identifier for the rough draft mail that business device is returned is stored in first list.
Mail server, when receiving the rough draft mail of terminal device upload, can be each envelope rough draft mail creation correspondence
Mail piece identifier (No. UID), and mail piece identifier is returned into corresponding terminal device.Each described mail piece identifier is unique
An envelope rough draft mail in correspondence mail server, terminal device can be uploaded to mail service according to mail piece identifier mark
The rough draft mail of device.Therefore, the corresponding rough draft mail of mail piece identifier is to be synchronized to postal in mobile terminal scratch file folder
The rough draft mail of part server.The mail piece identifier extracted is stored in first list (Local by mobile terminal
MessageId Array lists) in.
Step S102:Obtain the mail piece identifier of rough draft mail stored in mail server, and by the mail piece identifiers
Symbol is stored in second list.
Mail piece identifier search command (UID SEARCH orders) in IMAP protocol, which is used to obtain on mail server, to be accorded with
The mail piece identifier of matching condition is closed, the SEARCH words without No. UID are returned if mail is not matched.UID SEARCH
Order carries querying condition parameter, keyword and value that querying condition parameter is usually clearly inquired about.It is mobile in the present embodiment
Terminal can send the UID SEARCH orders of rough draft mail to mail server, and the querying condition parameter of UID SEARCH orders is
Scratch file is pressed from both sides.Mail server is receiving the UID that scratch file presss from both sides querying condition parameter that carries of mobile terminal transmission
After SEARCH orders, the mail piece identifier for all rough draft mails being stored in mail server can be returned to mobile terminal.
The mail piece identifier of rough draft mail in the mail server received is stored in the secondary series of local data base by mobile terminal
In table (Remote MessageId Array lists).
In addition, in the present embodiment, mobile terminal sends the mail piece identifier search command of rough draft mail to mail server
Trigger condition can be mail synchronization order that mobile terminal is received.Mail synchronization order can be embodied in client
Whether the inquiry command being separately provided, the rough draft mail of synchronous mail server is needed for request for e-mail user;Also may be used
To be the mail synchronization order automatically generated when Email User opens the draft of client, now, without Email
User judges.
Step S103:Determine targeted mails identifier.
It can find out by traveling through first list and second list and be stored in second list, and be not stored in first list
Mail piece identifier, this mail piece identifier is defined as targeted mails identifier by the present embodiment.Targeted mails identifier is corresponding
During rough draft mail is mail server, the rough draft mail that other-end equipment than a mobile terminal is uploaded, that is, move
Dynamic terminal needs the synchronous rough draft mail downloaded.
Step S104:Rough draft mail corresponding with the targeted mails identifier is downloaded to shifting from the mail server
Dynamic terminal.
Reading order (FETCH orders) in IMAP protocol is used for the text message for reading mail, and FETCH orders are carried
Messageset parameters, messageset parameters represent the mail piece identifier list for wishing to read.In the present embodiment,
Messageset parameters are the list of targeted mails identifier.Mail server receives targeted mails identifier list
After FETCH orders, the rough draft mail corresponding with targeted mails identifier can be returned to mobile terminal, so that Email is used
Continue to operate this rough draft mail on mobile terminals in family.
Rough draft mail synchronization in mobile terminal can either be uploaded to mail server by the present embodiment, and can be by other
Rough draft mail synchronization in terminal device is downloaded to mobile terminal, to continue the rough draft mail for viewing or editing the download, carries
High Consumer's Experience.
But, in some cases, Email User may edit envelope grass repeatedly on different terminal devices
Original text mail, for example, Email User creates selection after an envelope rough draft, editor on Mail Clients A uploads mail service
Device, this is the initial version v1 of the envelope rough draft mail;If Email User synchronous draft on Mail Clients B,
The rough draft of v1 versions is synchronized to the version v2 as original rough draft mail after the completion of the local follow-up volume rough draft mail of sequeling, editor
Mail server is uploaded, this rough draft email storage can be the new rough draft mail of an envelope by mail server.If Email is used
The synchronous draft on Mail Clients C is continued at family, and the initial version v1 and version v2 of the envelope rough draft mail can be synchronized to this
Ground database.
Based on case above, the embodiment of the present application two provides a kind of synchronization side of the rough draft mail based on IMAP protocol
The initial version v1 received and version v2 are collected processing by method, the present embodiment, to realize rough draft mail in different mail visitor
Version on the end of family is reviewed.It is a kind of rough draft mail synchronization based on IMAP protocol that the embodiment of the present application two is provided referring to Fig. 3
The flow chart of method.As seen from Figure 3, this method comprises the following steps:
Step S201:When the rough draft mail of state to be uploaded in mobile terminal is uploaded to mail server, mail is taken
The mail piece identifier for the rough draft mail that business device is returned is stored in first list.
Step S202:Obtain the mail piece identifier of rough draft mail stored in mail server, and by the mail piece identifiers
Symbol is stored in second list.
Step S203:Determine targeted mails identifier.
Step S204:Rough draft mail corresponding with the targeted mails identifier is downloaded to shifting from the mail server
Dynamic terminal.
Step S205:Detect and whether there is at least two envelope theme identical rough draft mails in mobile terminal.If mobile whole
There are at least two envelope theme identical rough draft mails in end, then perform step S206.
Step S206:At least two envelope theme identical rough draft mails are stored according to the sequencing of uplink time
Temporary folder, the temporary folder is named with the theme of the rough draft mail stored.
The present embodiment reviews the different editions of rough draft mail for the ease of Email User, and by theme identical rough draft
Mail collects processing, will at least two envelope theme identical rough draft email storages are in a certain temporary folder, the interim text
Part, which is clipped in, to be presented as on Mail Clients with an e-mail messages of the theme name of the rough draft mail.In addition, for the ease of electricity
Sub- mail user searches for, checked that the rough draft mail in temporary folder is according to the time order and function order for being uploaded to mail server
Stored.
Fig. 4 is refer to, is a kind of schematic diagram for Mail Clients draft that the embodiment of the present application two is provided.In Fig. 4 institutes
In the rough draft mail tabulation shown, the e-mail messages in the black box of left side actually include two envelope rough draft mails, are theme phases
One kind of same rough draft mail collects form.Right side black box part is the expanded form of this e-mail messages, and Email is used
Family can one envelope rough draft mail of any selection be further processed in two envelope rough draft mails more than.Certainly, the application other
In embodiment, it can also only retain the envelope rough draft mail of uplink time the latest, to avoid the limited storage space of terminal device
When, the excessive rough draft mail of version additionally takes its memory space.
Fig. 5 is refer to, is the flow chart for the step S201 that the embodiment of the present application two is provided.As seen from Figure 5, step S201 is also
It may include steps of:
Step S2011:After mobile terminal preserves or updated rough draft mail, it will be needed in the scratch file folder of mobile terminal
Rough draft mail that will be synchronous is set to state to be uploaded.
The scratch file of mobile terminal presss from both sides to be used for the file for depositing rough draft mail, this implementation in mobile terminal data storehouse
Example in mobile terminal scratch file folder be with respective mail server scratch file folder be correspondingly arranged can synchronous documents
Folder.Only when mobile terminal detect its scratch file folder folder attribute for can synchronization folder when, just allow to perform text
The simultaneously operating of part folder, the scratch file folder of the scratch file folder of mobile terminal and mail server is synchronized.
In addition, the present embodiment can be by setting the upload attribute of rough draft mail, to realize that rough draft mail uploads state
Setting.The upload attribute of rough draft mail includes true and false two types, when mobile terminal detects the upload of rough draft mail
When attribute is labeled as true, you can the rough draft mail is judged as state to be uploaded, so as to by further simultaneously operating, will locate
In state to be uploaded rough draft mail synchronization to mail server;When mobile terminal detects the upload attribute mark of rough draft mail
During for false, that is, can determine that the rough draft mail is non-upload state, it is not necessary to which the rough draft mail is synchronized.
In the present embodiment, in order to distinguish the significance level of rough draft mail, mobile terminal can also be by important mark come area
Divide common rough draft mail and important rough draft mail.Important mark can be embodied in the mailbox client of mobile terminal, specifically
It can be the mark of red flag, starlike mark and other shapes and form.E-mail address user can be according to actual needs
Judge important rough draft mail, such as, can be need to continue to edit in other clients or addition annex in be uploaded
The rough draft mail or confidentiality of state are higher, are merely able to the rough draft mail in mobile terminal editor.
Step S2012:According to default synchronizing frequency, whether at least deposited in the scratch file folder for detecting the mobile terminal
The rough draft mail of state to be uploaded is in an envelope.If be at least in the scratch file folder of the mobile terminal in the presence of an envelope
The rough draft mail of state to be uploaded, then perform step S2073.
In the present embodiment, synchronizing frequency is set to real-time synchronization, that is, continues to monitor the upload attribute of rough draft mail, to contract
The synchronizing cycle of short grass original text mail.The mobile terminal difference maximum with PC ends is that mobile terminal is not real-time in the application
Online.Under normal circumstances, ability turn-on data business service is (such as only when mobile terminal user needs to access network
GSM/GPRS is serviced), and the rough draft mail synchronization that will be stored in mobile terminal is undoubtedly needed at mobile terminal to mail server
In presence, therefore, in order to reach the effect of real-time synchronization, it is necessary to which mobile terminal is in presence in real time, easily excessively
The electricity of mobile terminal is consumed, and easily produces extra expenses of surfing Internet.
In actual application situation, E-mail address user may edit an envelope rough draft postal in outdoor application mobile terminal
Part, but need to return it is indoor, using the annex that PC ends add file is larger, in this case, rough draft mail synchronization it is ageing
It is required that generally not high.Therefore, in the application other embodiment, mobile terminal can travel through a scratch file at regular intervals
Folder, the upload attribute of wherein each envelope rough draft mail of detection, when being at least in the rough draft mail of state to be uploaded in the presence of an envelope, then
Turn-on data business service uploads the rough draft mail.By the way that above-mentioned real-time synchronization band can be avoided to a certain extent with upper type
The problems come.In addition, use above situation is schematical citing, however it is not limited to which this applies situation.
Step S2013:Mail addition order is sent to the mail server, by the grass in state to be uploaded
Original text mail synchronization is to the mail server.
Mobile terminal to mail server send mail addition order (APPEND orders) before, it is necessary to first with mail
Server sets up TCP connections, and information exchange is carried out on this basis.APPEND orders in IMAP protocol allow on terminal device
A mail is carried into specified mail server file, the present embodiment will be in mobile terminal by APPEND orders and be treated
The rough draft mail synchronization of upload state is into the scratch file folder of mail server.Above rough draft mail is included in APPEND orders
Attribute, date created/creation time, mail size, and specific mail data (may include mail matter topics, Mail Contents
Deng), mail server is received after the APPEND orders of mobile terminal transmission, by the above rough draft included in APPEND orders
E-mail messages are preserved into scratch file folder, and then mobile terminal preserves the rough draft mail for needing to download to local data base,
So as to further edited or other processing, be finally completed synchronization of the rough draft mail in different terminals.
Step S2014:The rough draft mail in state to be uploaded is set to non-upload state.
The present embodiment is set to non-upload state by synchronous rough draft mail is completed, in case step S2012 detects the above
Rough draft mail is still within state to be uploaded and triggers simultaneously operating, causes rough draft mail to repeat upload, causes unnecessary net
The waste of network resource.
, may be due to the reason such as theme is similar, by synchronized mistake in addition, E-mail address user is when screening rough draft mail
Rough draft mail falsely drop to need synchronous rough draft mail, cause the same envelope rough draft mail without any operation by repeatedly
Pass, take unnecessary Internet resources and memory space.To avoid the generation of case above, the embodiment of the present application two provides another
A kind of outer rough draft mail synchronization method based on IMAP protocol.It is the step S2013 that the embodiment of the present application two is provided referring to Fig. 6
Flow chart.As seen from Figure 6, step S2013 comprises the following steps:
Step S20131:Whether detect in mail tabulation comprising corresponding with the rough draft mail in state to be uploaded
Mail piece identifier.If do not had in the mail tabulation comprising uniquely corresponding with the rough draft mail in state to be uploaded
Mail piece identifier, then perform step S20732.
Mail server therefrom extracts the effective of rough draft mail after the APPEND orders of mobile terminal transmission are received
Information (attribute of rough draft mail, date created/creation time, mail size, and specific mail data etc.), and will be above-mentioned
The effective information correspondence of rough draft mail is stored in the scratch file of mail server folder.Meanwhile, mail server can be reception
The each corresponding mail piece identifier of envelope rough draft mail creation arrived, and corresponding mail piece identifier is returned into mobile terminal, so as to
Mobile terminal identification has been synchronized to the rough draft mail of mail server.Mail piece identifier in the present embodiment is No. UID of mail,
Each envelope mail is unique in No. UID 32 certificates typically for mail in unique mark mailing system, mail server
One mail piece identifier of correspondence, to distinguish other mails.Mobile terminal is receiving the mail piece identifiers of mail server return
After symbol, it is stored in mail tabulation, mail tabulation is used to store the corresponding e-mail messages of each envelope rough draft mail, here
E-mail messages can include the effective information of above-mentioned rough draft mail and the identification information (such as No. UID) of rough draft mail.
Further, whether comprising corresponding with the rough draft mail in state to be uploaded in detection mail tabulation
Mail piece identifier, to determine the synchronous recording of correspondence rough draft mail.
Step S20132:Mail addition order is sent to the mail server.
If do not have to include in mail tabulation with the unique corresponding mail piece identifier of the rough draft mail in state to be uploaded,
Mail server is transmitted through on then showing this rough draft mail before this not, now, mail addition is sent to mail server and orders
Order, the same envelope rough draft mail without any operation is not resulted in so and repeats to upload.
It is the flow chart for the step S2011 that the embodiment of the present application two is provided referring to Fig. 7.As seen from Figure 7, step S2011 bags
Include following steps:
Step S20111:When mobile terminal, which is in, to be preserved or update rough draft mail state, detect whether to receive institute
Rough draft mail synchronization is stated to the instruction of mail server.If received the finger of the rough draft mail synchronization to mail server
Order, then perform step S20112.
Step S20112:The rough draft mail is set to state to be uploaded.
The present embodiment is when mobile terminal is in and preserves or update rough draft mail state, by detecting what is preserved or update
The synch command of rough draft mail, to determine the upload state of the rough draft mail.By the upload that rough draft mail is determined with upper type
State, can avoid the problem of above-mentioned rough draft mail by without change repeats to upload.In addition, the present embodiment is protected in rough draft mail
When depositing or determining that its upload state, that is, rough draft mail are changed while renewal, its upload state can be determined therewith.Move
When dynamic terminal detects the presence of the rough draft mail in state to be uploaded in real time, synchronization mechanism is triggered, this rough draft mail is same
Walk to mail server, it is seen then that the present embodiment determines that rough draft mail uploads the time conditions of state, be conducive to further shortening
The synchronizing cycle of rough draft mail.
When terminal device installs Mail Clients first, it is necessary first to grass is created in the local data base of terminal device
Original text file, and the corresponding relation of rough draft file and rough draft file in mail server in terminal device is set up, so as to
Subsequently by the rough draft mail synchronization in state to be uploaded in terminal device to mail server, and, by mail server
Rough draft mail be downloaded to local data base and be further processed.Use the feelings of Mail Clients first for mobile terminal
Condition, is that the mobile terminal that embodiment two is provided creates the flow chart of scratch file clamping method, specifically, in step referring to Fig. 8
In S2011 before needing synchronous rough draft mail to be set to state to be uploaded during the scratch file of mobile terminal is pressed from both sides, implement
Example two can also comprise the following steps:
Step S2001:Column directory command is sent to respective mail server, to obtain the file in the mailbox server
Press from both sides list.
Column directory command (LIST orders) in IMAP protocol is used to list existing file in mail server, specifically
Including two parameters, first is mailbox path parameter BASE, represents that user logs in catalogue;Second parameter is template,
Represent the Folder Name for wishing to show.The file that LIST orders can be listed comprising the path position and needs originated is accorded with
The feature of conjunction.The present embodiment can list the All Files folder included in mail server, other implementations by LIST orders
Example can also directly filter out scratch file folder by template parameters.
After the LIST orders that mail server receives mobile terminal transmission, mailbox service can be returned to mobile terminal
Folder List in device, Folder List includes the corresponding folder information of each file in mail server.File
Information can include folder attribute, the folder identifier for file in unique mark mail server, and file
The information such as the store path being clipped in mail server.
Step S2002:The folder information of rough draft file in mail server is extracted from the Folder List.
Folder information includes folder attribute, and the present embodiment can recognize that scratch file is pressed from both sides with folder attribute.Specifically
, the folder attribute of scratch file folder is designated Drafts, therefore, can determine folder attribute for Drafts file
Pressed from both sides for scratch file, so as to extract and the corresponding folder information of scratch file folder.
Step S2003:Create the scratch file for storing rough draft mail in the terminal to press from both sides, the scratch file folder
Include the folder information of rough draft file in the mail server.
In the present embodiment, by step S2001 to step S2003, rough draft file and mail in mobile terminal are established
The corresponding relation of rough draft file in server, so as to the simultaneously operating of subsequent terminal equipment and mail server.
The embodiment of the present application three additionally provides a kind of sychronisation of the rough draft mail based on IMAP protocol, applied to movement
Terminal.It is a kind of sychronisation 300 for rough draft mail based on IMAP protocol that the embodiment of the present application three is provided referring to Fig. 9
Structural representation.As seen from Figure 9, sychronisation 300 includes:
First memory module 301, for being uploaded to mail server when the rough draft mail of state to be uploaded in mobile terminal
When, the mail piece identifier for the rough draft mail that mail server is returned is stored in first list;
Second memory module 302, the mail piece identifier of the rough draft mail stored for obtaining in mail server, and by institute
State mail piece identifier and be stored in second list;
Determining module 303, for determining targeted mails identifier, the targeted mails identifier is stored in second list,
And it is not stored in first list;
Synchronization module 304, for will rough draft mail corresponding with the targeted mails identifier from the mail server
It is downloaded to mobile terminal.
In addition, present invention also provides a kind of terminal device, the terminal device includes the synchronous dress described in embodiment three
Put.
In the specific implementation, the present invention also provides a kind of computer-readable storage medium, wherein, the computer-readable storage medium can be stored
There is program, the program may include the part or all of step in each embodiment for the method for calling that the present invention is provided when performing.Institute
The storage medium stated can be magnetic disc, CD, read-only memory (English:Read-only memory, referred to as:ROM) or with
Machine storage memory (English:Random access memory, referred to as:RAM) etc..
It is required that those skilled in the art can be understood that the technology in the embodiment of the present invention can add by software
The mode of general hardware platform realize.Understood based on such, the technical scheme in the embodiment of the present invention substantially or
Say that the part contributed to prior art can be embodied in the form of software product, the computer software product can be deposited
Storage is in storage medium, such as ROM/RAM, magnetic disc, CD, including some orders to cause a computer equipment (can be with
It is personal computer, server, or network equipment etc.) perform some part institutes of each of the invention embodiment or embodiment
The method stated.
Claims (8)
1. a kind of rough draft mail synchronization method based on IMAP protocol, applied to mobile terminal, it is characterised in that methods described bag
Include:
When the rough draft mail of state to be uploaded in mobile terminal is uploaded to mail server, the rough draft that mail server is returned
The mail piece identifier of mail is stored in first list;
The mail piece identifier of the rough draft mail stored in mail server is obtained, and the mail piece identifier is stored in secondary series
Table;
Targeted mails identifier is determined, the targeted mails identifier is stored in second list, and is not stored in first list;
Rough draft mail corresponding with the targeted mails identifier is downloaded to mobile terminal from the mail server.
2. the method as described in claim 1, it is characterised in that will rough draft mail corresponding with the targeted mails identifier
It is downloaded to from the mail server after mobile terminal, methods described also includes:
Detect and whether there is at least two envelope theme identical rough draft mails in mobile terminal;
If there are at least two envelope theme identical rough draft mails in mobile terminal, at least two envelope theme identicals grass by described in
Original text mail is stored in temporary folder according to the sequencing of uplink time, and the temporary folder is with the rough draft mail that stores
Theme is named.
3. the method as described in claim 1, it is characterised in that the rough draft mail of state to be uploaded is uploaded in the mobile terminal
To mail server, specifically include:
After mobile terminal preserves or updated rough draft mail, synchronous rough draft postal will be needed in the scratch file folder of mobile terminal
The scratch file folder that part is set in state to be uploaded, the mobile terminal is corresponding with the scratch file folder in mail server
What is set can synchronization folder;
If at least there is the rough draft mail that an envelope is in state to be uploaded in the scratch file folder of the mobile terminal, to institute
State mail server and send mail addition order, the rough draft mail synchronization in state to be uploaded to the mail is taken
Business device;
The rough draft mail in state to be uploaded is set to non-upload state.
4. method as claimed in claim 3, it is characterised in that if in the scratch file folder of the mobile terminal at least
The rough draft mail of state to be uploaded is in the presence of an envelope, then sending mail addition to the mail server orders, and specifically includes:
If at least there is the rough draft mail that an envelope is in state to be uploaded in the scratch file folder of the mobile terminal, detect
Whether the mail piece identifier corresponding with the rough draft mail in state to be uploaded is included in mail tabulation, described in each
Mail piece identifier uniquely corresponds to the envelope rough draft mail in mail server, and the mail tabulation is used to store each envelope rough draft mail
Corresponding e-mail messages;
If not having to include and the unique corresponding mail mark of the rough draft mail in state to be uploaded in the mail tabulation
Know symbol, then sending mail addition to the mail server orders.
5. method as claimed in claim 3, it is characterised in that described after mobile terminal preserves or updated rough draft mail,
In the scratch file folder of mobile terminal synchronous rough draft mail will be needed to be set to state to be uploaded, specifically included:
When mobile terminal, which is in, to be preserved or update rough draft mail state, detect whether to receive the rough draft mail synchronization extremely
The instruction of mail server;
If received the instruction of the rough draft mail synchronization to mail server, the rough draft mail is set to treat
Biography state.
6. method as claimed in claim 3, it is characterised in that need synchronization in the scratch file folder by mobile terminal
Rough draft mail be set to before state to be uploaded, methods described also includes:
Column directory command is sent to respective mail server, to obtain the Folder List in the mailbox server, the text
Part folder list includes the corresponding folder information of each file in mail server;
The folder information of rough draft file in mail server is extracted from the Folder List;
Create the scratch file for storing rough draft mail in the terminal to press from both sides, the scratch file folder includes the mail
The folder information of rough draft file in server.
7. a kind of sychronisation of the rough draft mail based on IMAP protocol, applied to mobile terminal, it is characterised in that described device
Including:
First memory module, for when the rough draft mail of state to be uploaded in mobile terminal is uploaded to mail server, by postal
The mail piece identifier for the rough draft mail that part server is returned is stored in first list;
Second memory module, the mail piece identifier of the rough draft mail stored for obtaining in mail server, and by the mail
Identifier is stored in second list;
Determining module, for determining targeted mails identifier, the targeted mails identifier is stored in second list, and does not store
In first list;
Synchronization module, for from the mail server rough draft mail corresponding with the targeted mails identifier to be downloaded into shifting
Dynamic terminal.
8. a kind of terminal device, it is characterised in that the terminal device includes sychronisation as claimed in claim 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710546713.1A CN107104889B (en) | 2017-07-06 | 2017-07-06 | Draft mail synchronization method, draft mail synchronization device and draft mail synchronization terminal based on IMAP protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710546713.1A CN107104889B (en) | 2017-07-06 | 2017-07-06 | Draft mail synchronization method, draft mail synchronization device and draft mail synchronization terminal based on IMAP protocol |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107104889A true CN107104889A (en) | 2017-08-29 |
CN107104889B CN107104889B (en) | 2020-12-04 |
Family
ID=59663727
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710546713.1A Active CN107104889B (en) | 2017-07-06 | 2017-07-06 | Draft mail synchronization method, draft mail synchronization device and draft mail synchronization terminal based on IMAP protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107104889B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108055346A (en) * | 2017-12-26 | 2018-05-18 | 广东睿江云计算股份有限公司 | A kind of method for optimizing mail terminal link |
WO2019071617A1 (en) * | 2017-10-09 | 2019-04-18 | 华为技术有限公司 | Method for synchronizing emails and terminal |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1569147B1 (en) * | 2004-02-27 | 2006-08-23 | Research In Motion Limited | Method and system for synchronizing a drafts folder |
CN102073723A (en) * | 2011-01-11 | 2011-05-25 | 青岛海信移动通信技术股份有限公司 | Method and device for managing mobile terminal mails |
CN102571990A (en) * | 2012-03-16 | 2012-07-11 | 北京彩云荣光软件有限公司 | E-mail synchronization method and system for mobile terminal |
CN103207818A (en) * | 2013-04-23 | 2013-07-17 | 互动在线(北京)科技有限公司 | Vocabulary entry edition backup method based on draft box and draft box system |
US20160050177A1 (en) * | 2014-08-18 | 2016-02-18 | Dropbox, Inc. | Managing drafts of electronic documents across client devices |
CN105812402A (en) * | 2014-12-29 | 2016-07-27 | 腾讯科技(深圳)有限公司 | File transmission method and device based on Internet of things |
US20170054667A1 (en) * | 2015-08-19 | 2017-02-23 | Blackberry Limited | Method to pre-select folders to synchronize during initial email activation on a mobile device |
-
2017
- 2017-07-06 CN CN201710546713.1A patent/CN107104889B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1569147B1 (en) * | 2004-02-27 | 2006-08-23 | Research In Motion Limited | Method and system for synchronizing a drafts folder |
CN102073723A (en) * | 2011-01-11 | 2011-05-25 | 青岛海信移动通信技术股份有限公司 | Method and device for managing mobile terminal mails |
CN102571990A (en) * | 2012-03-16 | 2012-07-11 | 北京彩云荣光软件有限公司 | E-mail synchronization method and system for mobile terminal |
CN103207818A (en) * | 2013-04-23 | 2013-07-17 | 互动在线(北京)科技有限公司 | Vocabulary entry edition backup method based on draft box and draft box system |
US20160050177A1 (en) * | 2014-08-18 | 2016-02-18 | Dropbox, Inc. | Managing drafts of electronic documents across client devices |
CN105812402A (en) * | 2014-12-29 | 2016-07-27 | 腾讯科技(深圳)有限公司 | File transmission method and device based on Internet of things |
US20170054667A1 (en) * | 2015-08-19 | 2017-02-23 | Blackberry Limited | Method to pre-select folders to synchronize during initial email activation on a mobile device |
Non-Patent Citations (1)
Title |
---|
苏颖: "基于Qt的跨平台邮箱客户端的设计与实现", 《中国优秀硕士学位论文电子期刊》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019071617A1 (en) * | 2017-10-09 | 2019-04-18 | 华为技术有限公司 | Method for synchronizing emails and terminal |
CN111095877A (en) * | 2017-10-09 | 2020-05-01 | 华为技术有限公司 | E-mail synchronization method and terminal |
CN111095877B (en) * | 2017-10-09 | 2022-04-22 | 华为技术有限公司 | E-mail synchronization method and terminal |
CN108055346A (en) * | 2017-12-26 | 2018-05-18 | 广东睿江云计算股份有限公司 | A kind of method for optimizing mail terminal link |
CN108055346B (en) * | 2017-12-26 | 2020-12-22 | 广东睿江云计算股份有限公司 | Method for optimizing mail terminal link |
Also Published As
Publication number | Publication date |
---|---|
CN107104889B (en) | 2020-12-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100499938C (en) | Method and device for reminding SMS split | |
US11888805B2 (en) | Method and apparatus for storing email messages | |
CN104104778B (en) | Mobile terminal short message processing method and device | |
CN101951577B (en) | Short message processing method and device thereof | |
CN108881354B (en) | Push information storage method and device, server and computer storage medium | |
CN102769687B (en) | Mass texting system and method | |
CN105701096A (en) | Index generation method, data inquiry method, index generation device, data inquiry device and system | |
US20060168061A1 (en) | Server, server system, and e-mail delivery method | |
CN104077341A (en) | Keyword auto-response mapping relation generation method and device in instant messaging | |
CN100566302C (en) | Email display method and system | |
CN108600081A (en) | A kind of method and device that mail outgoing achieves, Mail Gateway | |
CN101072067A (en) | Device and method for realizing short-message classified sending, receiving and displaying | |
EP3552376B1 (en) | Card-based information management method and system | |
CN108595393A (en) | A kind of automatic form filling method and device | |
CN102739871B (en) | Information sending method and device of mobile terminal | |
CN108462625B (en) | Method and device for determining recipients in process of replying electronic mail | |
CN107104889A (en) | A kind of rough draft mail synchronization method, device and terminal based on IMAP protocol | |
CN102571990A (en) | E-mail synchronization method and system for mobile terminal | |
CN100546281C (en) | A kind of method and device that transmits data | |
WO2007097598A1 (en) | Icon transforming system, and service method for the same | |
CN104463556A (en) | Tidying and finding method and system for E-mail text citation information | |
CN101026628B (en) | Method and system for transmitting message for obtaining mail, and mail proxy server | |
CN102164152A (en) | Method and system for remotely processing files | |
CN104298416A (en) | Method and device for generating auto-response messages in instant messaging | |
CN104951533A (en) | Information name card querying method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11 Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd. Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11 Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd. |
|
CP01 | Change in the name or title of a patent holder |