CN104660493A - Connection processing method and device for mailbox client and email server - Google Patents

Connection processing method and device for mailbox client and email server Download PDF

Info

Publication number
CN104660493A
CN104660493A CN201510070593.3A CN201510070593A CN104660493A CN 104660493 A CN104660493 A CN 104660493A CN 201510070593 A CN201510070593 A CN 201510070593A CN 104660493 A CN104660493 A CN 104660493A
Authority
CN
China
Prior art keywords
mail server
mailbox client
client
connect
email
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.)
Pending
Application number
CN201510070593.3A
Other languages
Chinese (zh)
Inventor
杨惠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen ZTE Mobile Telecom Co Ltd
Original Assignee
Shenzhen ZTE Mobile Telecom Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen ZTE Mobile Telecom Co Ltd filed Critical Shenzhen ZTE Mobile Telecom Co Ltd
Priority to CN201510070593.3A priority Critical patent/CN104660493A/en
Publication of CN104660493A publication Critical patent/CN104660493A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a connection processing method for a mailbox client and an email server. The connection processing method for the mailbox client and the email server comprises the following steps: controlling the client and the email server to establish connection according to a preset email protocol; when the connection fails, switching the email protocol; and controlling the client and the email server to establish connection according to the switched email protocol. The invention further discloses a connection processing device for the mailbox client and the email server. According to the invention, successful connection between the mail client and the email server is realized, so that a user can access the mailbox to process mails.

Description

The connection processing method of mailbox client and mail server and device
Technical field
The present invention relates to communication technical field, particularly relate to connection processing method and the device of mailbox client and mail server.
Background technology
In recent years, along with extensively popularizing of the mobile terminal devices such as smart mobile phone, pad (panel computer), interpersonal communication way becomes variation, and user can carry out mail treatment by mobile terminal, drastically increases work, life efficiency.At present, although the mailbox client of mobile terminal supports all email protocols, in the process that mailbox client and the e-mail server of user connect, only use a kind of email protocol.When the email protocol that the e-mail server of user does not support mailbox client to use, the mailbox client of user and e-mail server just cannot connect, and cause user cannot access E-mail address and carry out mail treatment.
Summary of the invention
Main purpose of the present invention is the connection processing method and the device that provide a kind of mailbox client and mail server, when being intended to the email protocol when the e-mail server of user does not support mailbox client to use, realize mailbox client and e-mail server successfully connects.
For achieving the above object, the invention provides the connection processing method of a kind of mailbox client and mail server, the connection processing method of described mailbox client and mail server comprises the following steps:
Connect according to the email protocol control client preset and e-mail server;
When described connection failure, switch email protocol;
Described client is controlled and described e-mail server connects according to the email protocol after switching.
Preferably, also comprise before the step of described switching email protocol:
Judge whether all email protocols of mailbox client support travel through;
If so, then terminate to connect with described e-mail server.
Preferably, the email protocol preset of described basis controls the step that client and e-mail server connect and comprises:
Bind command is sent request to described e-mail server according to described default email protocol;
Receive the response message that described e-mail server returns, and whether successfully connect according to described response message judgement and described e-mail server.
Preferably, describedly to comprise according to the described response message whether successfully step that judges to connect with described e-mail server:
The response message that described e-mail server returns if receive is the first signaling message, then judge to connect successfully with described e-mail server;
The response message that described e-mail server returns if receive is the second signaling message, then judge to connect unsuccessfully with described e-mail server.
Preferably, described judgement and described e-mail server connect after successful step and also comprise:
Send verify data to described e-mail server;
Receive the authentication result that described e-mail server returns, and judge that whether certification is successful according to described authentication result;
If authentification failure, then resend verify data to described e-mail server;
If authentication success, then carry out E-mail service access.
In addition, for achieving the above object, present invention also offers the connection handling device of a kind of mailbox client and mail server, the connection handling device of described mailbox client and mail server comprises:
First link block, for connecting according to the email protocol control client preset and e-mail server;
Handover module, for when described connection failure, switches email protocol;
Second link block, for controlling described client and described e-mail server connects according to the email protocol after switching.
Preferably, the connection handling device of described mailbox client and mail server also comprises control module, and described control module comprises:
First judging unit, for judging whether all email protocols of mailbox client support travel through;
Control unit, if travel through for all email protocols of mailbox client support, then terminates to connect with described e-mail server.
Preferably, described first link block comprises:
First transmitting element, for sending request bind command to described e-mail server according to described default email protocol;
Whether the second judging unit, for receiving the response message that described e-mail server returns, and connect successful according to described response message judgement and described e-mail server.
Preferably, described judging unit specifically for:
The response message that described e-mail server returns if receive is the first signaling message, then judge to connect successfully with described e-mail server;
The response message that described e-mail server returns if receive is the second signaling message, then judge to connect unsuccessfully with described e-mail server.
Preferably, the connection handling device of described mailbox client and mail server also comprises processing module, and described processing module comprises:
Second transmitting element, for sending verify data to described e-mail server;
According to described authentication result, 3rd judging unit, for receiving the authentication result that described e-mail server returns, and judges that whether certification is successful;
Processing unit, if for authentification failure, then resends verify data to described e-mail server; If authentication success, then carry out E-mail service access.
The present invention is by connecting according to the email protocol control client preset and e-mail server; When described connection failure, switch email protocol; Described client is controlled and described e-mail server connects according to the email protocol after switching.The present invention, when client and e-mail server connect failure, switches email protocol, again connects with described e-mail server according to the email protocol after switching.By repeatedly connecting with described e-mail server, realizing mailbox client and e-mail server successfully connects, enabling user's access mailboxes carry out mail treatment.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of connection processing method first embodiment of mailbox client of the present invention and mail server;
Fig. 2 controls client and e-mail server according to the email protocol preset in Fig. 1 to connect the refinement schematic flow sheet of step;
Fig. 3 receives the response message that described e-mail server returns in Fig. 2, and the refinement schematic flow sheet of the whether successful step of judging to connect with described e-mail server according to described response message;
Fig. 4 is the schematic flow sheet of connection processing method second embodiment of mailbox client of the present invention and mail server;
Fig. 5 is the schematic flow sheet of connection processing method the 3rd embodiment of mailbox client of the present invention and mail server;
Fig. 6 is the high-level schematic functional block diagram of connection handling device first embodiment of mailbox client of the present invention and mail server;
Fig. 7 is the high-level schematic functional block diagram of the first link block in Fig. 6;
Fig. 8 is the high-level schematic functional block diagram of connection handling device second embodiment of mailbox client of the present invention and mail server;
Fig. 9 is the high-level schematic functional block diagram of processing module in Fig. 8;
Figure 10 is the high-level schematic functional block diagram of connection handling device the 3rd embodiment of mailbox client of the present invention and mail server;
Figure 11 is the high-level schematic functional block diagram of control module in Figure 10.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, are described further with reference to accompanying drawing.
Embodiment
Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
The connection processing method of mailbox client provided by the invention and mail server is mainly used in the mobile terminal such as smart mobile phone, pad, but the connection processing method of this mailbox client and mail server is not limited to be applied in the mobile terminals such as smart mobile phone.Be described in detail for the connection processing method of smart mobile phone to mailbox client of the present invention and mail server below.
With reference to the schematic flow sheet that Fig. 1, Fig. 1 are connection processing method first embodiment of mailbox client of the present invention and mail server.
In a first embodiment, the connection processing method of this mailbox client and mail server comprises the following steps:
Step S11, controls client according to the email protocol preset and e-mail server connects;
In the present embodiment, for smart mobile phone, the method that the present invention accesses e-mail server is described in detail.In other embodiments, the method for this access e-mail server can also be applied in the mobile terminal products such as pad.When user is at the mailbox client input username and password of smart mobile phone, having configured username and password carries out in logging on e-mail boxes process, according to the email protocol preset that mailbox client is supported, attempt connecting with the e-mail server of user.The email protocol that the mailbox client support of smart mobile phone is conventional, comprise SMTP (Simple Mail Transfer Protocol, Simple Mail Transfer protocol), POP3 (Post Office Protocol-Version 3, post office protocol), IMAP (Internet Mail Access Protocol, Internet Message Access Protocol).In the present embodiment, the email protocol preset is IMAP, uses port 143 to attempt connecting with e-mail server by transport layer protocol TCP.In other embodiments, default email protocol can be other conventional email protocol.
Step S12, when described connection failure, switches email protocol;
When the email protocol that basis in step S11 is preset, also namely IMAP and e-mail server connect successfully, mailbox client and e-mail server set up IMAP session, and namely conventional mailbox client and e-mail server carry out the three phases included by IMAP session: authentication phase, transaction phase, more new stage.Therefore, the process that mailbox client and e-mail server set up IMAP session just repeats no more at this.When connecting unsuccessfully according to IMAP and e-mail server in rapid S11, also namely the e-mail server of user does not support IMAP, then switch email protocol, abandon connecting according to IMAP and e-mail server, change to other the conventional email protocols using mailbox client to support.
Step S13, controls described client according to the email protocol after switching and described e-mail server connects.
When the email protocol that basis is preset and e-mail server connect failure, in the present embodiment, also namely connect unsuccessfully according to IMAP and e-mail server, when the e-mail server of user does not support IMAP, switch and use POP3 to attempt again connecting with described e-mail server.In other embodiments, the email protocol after switching can also be other the conventional email protocols beyond POP3.
The mailbox client that the present embodiment provides and the connection processing method of mail server, first control client according to the email protocol preset and e-mail server connects; When described connection failure, then switch email protocol; Then described client is controlled and described e-mail server connects according to the email protocol after switching.The connection processing method of the present embodiment mailbox client and mail server, with described e-mail server connect failure time, switch email protocol, then according to the email protocol after switching, again attempt connecting with described e-mail server.By repeatedly attempting connecting with described e-mail server, realize mailbox client and e-mail server successfully connects.
Further, as shown in Figure 2, above-mentioned steps S11 comprises:
Step S111, sends request bind command to described e-mail server according to described default email protocol;
In the present embodiment, when user is at the mailbox client input username and password of smart mobile phone, has configured username and password and carried out in logging on e-mail boxes process, attempted connecting with the e-mail server of user according to IMAP.Use port 143 by transport layer protocol TCP, send request the e-mail server of bind command to user.
Whether step S112, receives the response message that described e-mail server returns, and connect successful according to described response message judgement and described e-mail server.
After the e-mail server of user listens to described request bind command, send response message to mailbox client.When receiving the response message that described e-mail server returns, according to the described response message returned, whether judgement and described e-mail server connect successful.
Further, as shown in Figure 3, above-mentioned steps S112 specifically comprises:
Step S1121, receives the response message that described e-mail server returns;
After the e-mail server of user listens to described request bind command, send response message to mailbox client according to described request bind command, client receives the response message that described e-mail server returns.
Step S1122, if described response message is the first signaling message, then judges to connect successfully with described e-mail server; If described response message is the second signaling message, then judge to connect unsuccessfully with described e-mail server.
The response message that described e-mail server returns if receive is the first signaling message, and in the present embodiment, described first signaling message is " S:*OK IMAP4 Server (IMail 6.00) ".When receiving described e-mail server and returning " S:*OK IMAP4 Server (IMail 6.00) ", then judge to connect successfully with described e-mail server.
The response message that described e-mail server returns if receive is the second signaling message, and in the present embodiment, described second signaling message is " S:*Bye IMAP4 Server (IMail 6.00) ".When receiving described e-mail server and returning " S:*Bye IMAP4 Server (IMail 6.00) ", then judge to connect unsuccessfully with described e-mail server.
Further, reference Fig. 4, Fig. 4 is the schematic flow sheet of connection processing method second embodiment of mailbox client of the present invention and mail server.
Based on the first embodiment, in a second embodiment, the connection processing method of mailbox client and mail server also comprises step:
Step S14, sends verify data to described e-mail server;
When receiving described e-mail server and returning " S:*OK IMAP4 Server (IMail 6.00) ", when also namely connecting successful with described e-mail server, send verify data to described e-mail server.Described verify data comprises the information such as email address, subscriber phone number of user.
Step S15, receives the authentication result that described e-mail server returns, and judges that whether certification is successful according to described authentication result; If authentification failure, then perform step S16, if authentication success, then perform step S17;
Step S16, resends verify data to described e-mail server;
Step S17, carries out E-mail service access.
After described e-mail server receives verify data, authentication is carried out to mailbox client, then authentication result is back to mailbox client.After receiving the authentication result that described e-mail server returns, according to the described authentication result returned, judge certification whether success.If the authentication result returned is the first authentication result, then judge authentication success, send data to described e-mail server, carry out E-mail service access, and after completing E-mail service access, stop the connection of setting up with described e-mail server.If the authentication result returned is the second authentication result, then judge authentification failure, i.e. username and password mistake, when user re-enters username and password, again get verify data, resend verify data to described e-mail server.
The mailbox client that the present embodiment provides and the connection processing method of mail server, connecting successfully with e-mail server, also comprising step: send verify data to described e-mail server; Receive the authentication result that described e-mail server returns, and judge that whether certification is successful according to described authentication result; If authentification failure, then resend verify data to described e-mail server; If authentication success, then carry out E-mail service access.When connecting successful with described e-mail server, sending verify data to described e-mail server, and after the authentication has been successful, carrying out electronic mail access, thus achieve user's access mailboxes and carry out mail treatment.
Further, reference Fig. 5, Fig. 5 is the schematic flow sheet that the present invention accesses method the 3rd embodiment of e-mail server.
In the third embodiment, the method for this access e-mail server comprises the following steps:
Step S21, controls client according to the email protocol preset and e-mail server connects;
In the present embodiment, for smart mobile phone, the method that the present invention accesses e-mail server is described in detail.In other embodiments, the method for this access e-mail server can also be applied in the mobile terminal products such as pad.When user is at the mailbox client input username and password of smart mobile phone, having configured username and password carries out in logging on e-mail boxes process, according to the email protocol preset that mailbox client is supported, attempt connecting with the e-mail server of user.The email protocol that the mailbox client support of smart mobile phone is conventional, comprise SMTP (Simple Mail TransferProtocol, Simple Mail Transfer protocol), POP3 (Post Office Protocol-Version 3, post office protocol), IMAP (Internet Mail Access Protocol, Internet Message Access Protocol).In the present embodiment, the email protocol preset is IMAP, uses port 143 to attempt connecting with e-mail server by transport layer protocol TCP.In other embodiments, default email protocol can be other conventional email protocol.
Step S22, when described connection failure, judges whether all email protocols of mailbox client support travel through; If so, then step S23 is performed; If not, then step S24 is performed;
Step S23, terminates to connect with described e-mail server;
Step S24, switches email protocol, and connects according to the email protocol control client after switching and described e-mail server.
When the email protocol that basis in step S21 is preset, also namely IMAP and e-mail server connect successfully, mailbox client and e-mail server set up IMAP session, and namely conventional mailbox client and e-mail server carry out the three phases included by IMAP session: authentication phase, transaction phase, more new stage.Therefore, the process that mailbox client and e-mail server set up IMAP session just repeats no more at this.When connecting unsuccessfully according to IMAP and e-mail server in rapid S21, namely when the e-mail server of user does not support IMAP yet, then judge whether all email protocols of mailbox client support travel through, namely whether attempted connecting with e-mail server according to each Email association of mailbox client support.
Attempt connecting with e-mail server according to each Email association of mailbox client support if judge in step S22, also after the email protocol of i.e. mailbox client support travels through, still connect unsuccessfully with e-mail server, then terminate to connect with described e-mail server, cannot carry out E-mail service access, user does not carry out mail treatment by mailbox client.
If judge in step S22, all email protocols of mailbox client support also do not travel through, namely in the email protocol of mailbox client support, also there is untapped email protocol, also do not attempt connecting with e-mail server according to described untapped email protocol.Now, then according to the second email protocol, also namely described untapped email protocol is attempted again connecting with e-mail server.The email protocol of method to the support of mailbox client according to this step travels through, until connect successfully with described e-mail server; Or connect unsuccessfully according to each email protocol of mailbox client support and e-mail server, then terminate to connect with described e-mail server.
The mailbox client that the present embodiment provides and the connection processing method of mail server, control client according to the email protocol preset and e-mail server connects; When described connection failure, judge whether all email protocols of mailbox client support travel through; If so, then terminate to connect with described e-mail server; If not, then switch email protocol, and attempt connecting with described e-mail server according to the email protocol after switching.In the present embodiment with described e-mail server connect failure time, judge whether all email protocols of mailbox client support travel through; If not, then switch email protocol, and according to the email protocol after switching, again attempt connecting with described e-mail server.By traveling through the email protocol of mailbox client support, until connect successfully with described e-mail server; Or connect unsuccessfully with e-mail server, then terminate to connect with described e-mail server.The method of the access e-mail server of the present embodiment further ensure that mailbox client and e-mail server connect successfully, access mailboxes can carry out mail treatment for user.
Further, the invention provides the connection handling device of a kind of mailbox client and mail server.With reference to the high-level schematic functional block diagram that Fig. 6, Fig. 6 are connection handling device first embodiment of mailbox client of the present invention and mail server.
In a first embodiment, the connection handling device of this mailbox client and mail server comprises:
First link block 11, for connecting according to the email protocol control client preset and e-mail server;
Handover module 12, for when described connection failure, switches email protocol;
Second link block 13, for controlling described client and described e-mail server connects according to the email protocol after switching.
In the present embodiment, for smart mobile phone, mobile terminal of the present invention is described in detail.In other embodiments, this mobile terminal further comprises the electronics mobile terminal products such as pad.When user is at the mailbox client input username and password of smart mobile phone, having configured username and password carries out in logging on e-mail boxes process, the email protocol preset that first link block 11 is supported according to mailbox client, attempts connecting with the e-mail server of user.The email protocol that the mailbox client support of smart mobile phone is conventional, comprise SMTP (Simple Mail Transfer Protocol, Simple Mail Transfer protocol), POP3 (Post Office Protocol-Version 3, post office protocol), IMAP (Internet Mail AccessProtocol, Internet Message Access Protocol).In the present embodiment, the email protocol preset is IMAP, uses port 143 to attempt connecting with e-mail server by transport layer protocol TCP.In other embodiments, default email protocol can be other conventional email protocol.
When the first link block 11 is according to the email protocol preset, also namely IMAP and e-mail server connect successfully, mailbox client and e-mail server set up IMAP session, and namely conventional mailbox client and e-mail server carry out the three phases included by IMAP session: authentication phase, transaction phase, more new stage.Therefore, the process that mailbox client and e-mail server set up IMAP session just repeats no more at this.When the first link block 11 connects unsuccessfully according to IMAP and e-mail server, also namely the e-mail server of user does not support IMAP, and handover module 12 switches email protocol, uses other conventional email protocols that mailbox client is supported.Second link block 13 attempts again connecting with e-mail server according to the email protocol after switching.In the present embodiment, when the first link block 11 connects unsuccessfully according to IMAP and e-mail server, handover module 12 switches use POP3.In other embodiments, handover module 12 can also switch other the conventional email protocols used beyond POP3.
The mailbox client that the present embodiment provides and the connection handling device of mail server, comprising: the first link block 11, for connecting according to the email protocol control client preset and e-mail server; Handover module 12, for when described connection failure, switches email protocol; Second link block 13, for controlling described client and described e-mail server connects according to the email protocol after switching.The present embodiment with e-mail server connect failure time, switch email protocol, and attempt again connecting with described e-mail server according to the email protocol after switching, by repeatedly attempting connecting with described e-mail server, realize mailbox client and e-mail server successfully connects.
Particularly, as shown in Figure 7, described first link block 11 comprises:
First transmitting element 111, for sending request bind command to described e-mail server according to described default email protocol;
Whether the second judging unit 112, for receiving the response message that described e-mail server returns, and connect successful according to described response message judgement and described e-mail server.
In the present embodiment, when user is at the mailbox client input username and password of smart mobile phone, having configured username and password carries out in logging on e-mail boxes process, first transmitting element 111 is attempted connecting with the e-mail server of user according to IMAP, use port 143 by transport layer protocol TCP, send request the e-mail server of bind command to user.
After the e-mail server of user listens to described request bind command, send response message to mailbox client.When second judging unit 112 receives the response message that described e-mail server returns, according to the described response message returned, judge to connect with described e-mail server whether success.
Particularly, described second judging unit 112 for:
The response message that described e-mail server returns if receive is the first signaling message, then judge to connect successfully with described e-mail server;
The response message that described e-mail server returns if receive is the second signaling message, then judge to connect unsuccessfully with described e-mail server.
The response message that described e-mail server returns if receive is the first signaling message, and in the present embodiment, described first signaling message is " S:*OK IMAP4 Server (IMail 6.00) ".When returning " S:*OK IMAP4 Server (IMail 6.00) " when the second judging unit 112 receives described e-mail server, then judge to connect successfully with described e-mail server.
The response message that described e-mail server returns if receive is the second signaling message, and in the present embodiment, described second signaling message is " S:*Bye IMAP4 Server (IMail 6.00) ".When returning " S:*Bye IMAP4 Server (IMail6.00) " when the second judging unit 112 receives described e-mail server, then judge to connect unsuccessfully with described e-mail server.
Further, as shown in Figure 8 and Figure 9, Fig. 8 is the high-level schematic functional block diagram of the mailbox client of mobile terminal of the present invention and connection handling device second embodiment of mail server, and Fig. 9 is the high-level schematic functional block diagram of processing module in Fig. 8.
Based on the first embodiment, in a second embodiment, the connection handling device of mailbox client and mail server also comprises processing module 14, and described processing module 14 comprises:
Second transmitting element 141, for sending verify data to described e-mail server;
According to described authentication result, 3rd judging unit 142, for receiving the authentication result that described e-mail server returns, and judges that whether certification is successful;
Processing unit 143, if for authentification failure, then resends verify data to described e-mail server; If authentication success, then carry out E-mail service access.
When the second judging unit 112 of the first link block 11 receive e-mail server return " S:*OK IMAP4 Server (IMail 6.00) " time, when also namely connecting successful with described e-mail server, the second transmitting element 141 of processing module 14 sends verify data to described e-mail server.Described verify data comprises the information such as email address, subscriber phone number of user.After described e-mail server receives verify data, authentication is carried out to mailbox client, then authentication result is back to mailbox client.After the 3rd judging unit 142 of processing module 14 receives the authentication result that described e-mail server returns, according to the described authentication result returned, judge certification whether success.And described authentication result is fed back to user by display screen.If the authentication result returned is the first authentication result, then judge authentication success, the processing unit 143 of processing module 14 sends data to described e-mail server, carry out E-mail service access, and after completing E-mail service access, stop the connection of setting up with described e-mail server.If the authentication result returned is the second authentication result, then judge authentification failure, representative of consumer name and code error, input correct username and password by display screen prompting user.When user re-enters username and password, the processing unit 143 of processing module 14 resends verify data again to described e-mail server.
The mobile terminal that the present embodiment provides, the connection handling device of described mailbox client and mail server also comprises processing module 14, and described processing module 14 comprises: the second transmitting element 141, for sending verify data to described e-mail server; According to described authentication result, 3rd judging unit 142, for receiving the authentication result that described e-mail server returns, and judges that whether certification is successful; Processing unit 143, if for authentification failure, then resends verify data to described e-mail server; If authentication success, then carry out E-mail service access.When connecting successful with described e-mail server, processing module sends verify data to described e-mail server, and after the authentication has been successful, carries out electronic mail access, thus achieves user's access mailboxes and carry out mail treatment.
Further, as shown in Figure 10 and Figure 11, Figure 10 is the high-level schematic functional block diagram of the mailbox client of mobile terminal of the present invention and connection handling device the 3rd embodiment of mail server, and Figure 11 is the high-level schematic functional block diagram of control module in Figure 10.
Based on above-described embodiment, in the third embodiment, the connection handling device of described mailbox client and mail server also comprises control module 15, and described control module 15 comprises:
First judging unit 151, for judging whether all email protocols of mailbox client support travel through;
Control unit 152, if travel through for all email protocols of mailbox client support, then terminates to connect with described e-mail server.
In the present embodiment, for smart mobile phone, mobile terminal of the present invention is described in detail.In other embodiments, this mobile terminal further comprises the electronics mobile terminal products such as pad.When user is at the mailbox client input username and password of smart mobile phone, having configured username and password carries out in logging on e-mail boxes process, the email protocol preset that first link block 11 is supported according to mailbox client, attempts connecting with the e-mail server of user.The email protocol that the mailbox client support of smart mobile phone is conventional, comprise SMTP (Simple Mail Transfer Protocol, Simple Mail Transfer protocol), POP3 (Post Office Protocol-Version 3, post office protocol), IMAP (Internet Mail AccessProtocol, Internet Message Access Protocol).In the present embodiment, the email protocol preset is IMAP, uses port 143 to attempt connecting with e-mail server by transport layer protocol TCP.In other embodiments, default email protocol can be other conventional email protocol.
When the first link block 11 is according to the email protocol preset, also namely IMAP and e-mail server connect successfully, mailbox client and e-mail server set up IMAP session, and namely conventional mailbox client and e-mail server carry out the three phases included by IMAP session: authentication phase, transaction phase, more new stage.Therefore, the process that mailbox client and e-mail server set up IMAP session just repeats no more at this.When the first link block 11 connects unsuccessfully according to IMAP and e-mail server, namely when the e-mail server of user does not support IMAP yet, whether the first judging unit 151 of control module 15 judges whether the email protocol of mailbox client support travels through, namely attempted connecting with e-mail server according to each Email association of mailbox client support.
If attempted connecting with e-mail server according to each Email association of mailbox client support, also after the email protocol of i.e. mailbox client support travels through, still connect unsuccessfully with e-mail server, then the control unit 152 of control module 15 terminates to connect with described e-mail server.Described mailbox client cannot carry out E-mail service access, and user does not carry out mail treatment by mailbox client.
If all email protocols of mailbox client support also do not travel through, namely in the email protocol of mailbox client support, also there is untapped email protocol, also do not attempt connecting with e-mail server according to described untapped email protocol.The control unit 152 of control module 15 triggers handover module 12 and switches email protocol, then the second link block 13 is according to the email protocol after switching, and also namely described untapped email protocol is attempted again connecting with e-mail server.When connecting successfully with described e-mail server, the second transmitting element 141 of processing module 14 sends verify data to described e-mail server.When the 3rd judging unit 142 of processing module 14 receives the authentication result that described e-mail server returns, judge certification whether success according to described authentication result.If authentification failure, the processing unit 143 of processing module 14 resends verify data to described e-mail server.If authentication success, the processing unit 143 of processing module 14 carries out E-mail service access.
The mobile terminal that the present embodiment provides, the connection handling device of described mailbox client and mail server also comprises control module 15, described control module 15 comprises: the first judging unit 151, for judging whether all email protocols of mailbox client support travel through; Control unit 152, if travel through for all email protocols of mailbox client support, then terminates to connect with described e-mail server.With described e-mail server connect failure time, the first judging unit 151 of control module 15 judges whether the email protocol of mailbox client support travels through; If not, the control unit 152 of control module 15 triggers handover module 12 and switches email protocol; Second link block 13, according to the email protocol after switching, attempts connecting with described e-mail server again.If so, the control unit 152 of control module 15 terminates to connect with described e-mail server.By traveling through all email protocols of mailbox client support, until connect successfully with described e-mail server; Or connect unsuccessfully with e-mail server, then terminate to connect with described e-mail server.The present embodiment further ensure that mailbox client and e-mail server successfully connect, and enables user's access mailboxes carry out mail treatment.
These are only the preferred embodiments of the present invention; not thereby the scope of the claims of the present invention is limited; every utilize specification of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (10)

1. a connection processing method for mailbox client and mail server, is characterized in that, the connection processing method of described mailbox client and mail server comprises the following steps:
Connect according to the email protocol control client preset and e-mail server;
When described connection failure, switch email protocol;
Described client is controlled and described e-mail server connects according to the email protocol after switching.
2. the connection processing method of mailbox client as claimed in claim 1 and mail server, is characterized in that, also comprise before the step of described switching email protocol:
Judge whether all email protocols of mailbox client support travel through;
If so, then terminate to connect with described e-mail server.
3. the connection processing method of mailbox client as claimed in claim 1 and mail server, is characterized in that, the email protocol control client that described basis is preset and the step that e-mail server connects comprise:
Bind command is sent request to described e-mail server according to described default email protocol;
Receive the response message that described e-mail server returns, and whether successfully connect according to described response message judgement and described e-mail server.
4. mailbox client as claimed in claim 3 and the connection processing method of mail server, is characterized in that, describedly judges to connect with described e-mail server whether successful step comprises according to described response message:
The response message that described e-mail server returns if receive is the first signaling message, then judge to connect successfully with described e-mail server;
The response message that described e-mail server returns if receive is the second signaling message, then judge to connect unsuccessfully with described e-mail server.
5. the connection processing method of mailbox client as claimed in claim 4 and mail server, is characterized in that, described judgement and described e-mail server connect after successful step and also comprise:
Send verify data to described e-mail server;
Receive the authentication result that described e-mail server returns, and judge that whether certification is successful according to described authentication result;
If authentification failure, then resend verify data to described e-mail server;
If authentication success, then carry out E-mail service access.
6. a connection handling device for mailbox client and mail server, is characterized in that, the connection handling device of described mailbox client and mail server comprises:
First link block, for connecting according to the email protocol control client preset and e-mail server;
Handover module, for when described connection failure, switches email protocol;
Second link block, for controlling described client and described e-mail server connects according to the email protocol after switching.
7. the connection handling device of mailbox client as claimed in claim 6 and mail server, it is characterized in that, the connection handling device of described mailbox client and mail server also comprises control module, and described control module comprises:
First judging unit, for judging whether all email protocols of mailbox client support travel through;
Control unit, if travel through for all email protocols of mailbox client support, then terminates to connect with described e-mail server.
8. the connection handling device of mailbox client as claimed in claim 6 and mail server, it is characterized in that, described first link block comprises:
First transmitting element, for sending request bind command to described e-mail server according to described default email protocol;
Whether the second judging unit, for receiving the response message that described e-mail server returns, and connect successful according to described response message judgement and described e-mail server.
9. the connection handling device of mailbox client as claimed in claim 8 and mail server, is characterized in that, described second judging unit specifically for:
The response message that described e-mail server returns if receive is the first signaling message, then judge to connect successfully with described e-mail server;
The response message that described e-mail server returns if receive is the second signaling message, then judge to connect unsuccessfully with described e-mail server.
10. the connection handling device of mailbox client as claimed in claim 9 and mail server, it is characterized in that, the connection handling device of described mailbox client and mail server also comprises processing module, and described processing module comprises:
Second transmitting element, for sending verify data to described e-mail server;
According to described authentication result, 3rd judging unit, for receiving the authentication result that described e-mail server returns, and judges that whether certification is successful;
Processing unit, if for authentification failure, then resends verify data to described e-mail server; If authentication success, then carry out E-mail service access.
CN201510070593.3A 2015-02-10 2015-02-10 Connection processing method and device for mailbox client and email server Pending CN104660493A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510070593.3A CN104660493A (en) 2015-02-10 2015-02-10 Connection processing method and device for mailbox client and email server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510070593.3A CN104660493A (en) 2015-02-10 2015-02-10 Connection processing method and device for mailbox client and email server

Publications (1)

Publication Number Publication Date
CN104660493A true CN104660493A (en) 2015-05-27

Family

ID=53251217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510070593.3A Pending CN104660493A (en) 2015-02-10 2015-02-10 Connection processing method and device for mailbox client and email server

Country Status (1)

Country Link
CN (1) CN104660493A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959155A (en) * 2016-06-24 2016-09-21 维沃移动通信有限公司 Connecting method of email box and mobile terminal
CN109639471A (en) * 2018-12-03 2019-04-16 郑州云海信息技术有限公司 A kind of method and system of automatic transmission Email

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1992733A (en) * 2005-12-30 2007-07-04 上海晨兴电子科技有限公司 E-mail client and mail protocol determination method
CN103746902A (en) * 2013-12-30 2014-04-23 深圳市广和通实业发展有限公司 Sending method for Emails

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1992733A (en) * 2005-12-30 2007-07-04 上海晨兴电子科技有限公司 E-mail client and mail protocol determination method
CN103746902A (en) * 2013-12-30 2014-04-23 深圳市广和通实业发展有限公司 Sending method for Emails

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959155A (en) * 2016-06-24 2016-09-21 维沃移动通信有限公司 Connecting method of email box and mobile terminal
CN109639471A (en) * 2018-12-03 2019-04-16 郑州云海信息技术有限公司 A kind of method and system of automatic transmission Email

Similar Documents

Publication Publication Date Title
CN101355524B (en) Method, system, server and terminal for processing information
CN103124267B (en) The method, system and the cloud server that log in/register is carried out by mobile terminal
TWI384804B (en) Method for providing services to a wireless transmit/receive unit
CN1794722B (en) Method of transfering off-line message and instant message server
US8769262B2 (en) VPN connection system and VPN connection method
US9807040B2 (en) Instant messaging system and method
US9787648B2 (en) System and method for trustzone attested authenticators
CN104301857A (en) Method and device for wireless communication between communication terminals
CN102413073A (en) Method and device for sending instant message
CN104092839A (en) Communication method, system, IM server and operator service platform and terminal
CN104158710A (en) Automatic switchover method of service application channel based on open intelligent gateway platform
CN103778528B (en) The processing method and system and device of payment
CN102892091A (en) Scheme for acquiring own mobile phone number
CN106060042A (en) Data processing method and device
CN104660493A (en) Connection processing method and device for mailbox client and email server
CN104936177A (en) Access authentication method and access authentication system
CN112235177B (en) Method, device and system for sending authentication information through instant messaging
CN105306577A (en) Data sharing system and method between handheld devices based on APP
CN202261388U (en) Remote gesture recognition and transmission realization system for touch panel mobile device with communication module
CN105227749A (en) Screen unlock method and system
CN102045670B (en) Method, server and smart card for transmitting short message
CN103685249B (en) A kind of register the method for application, terminal and server
CN102932564A (en) Communication proxy device fused with VoIP/IM (Voice over Internet Protocol)/(Instant Messenger) and mobile communication technology and use method thereof
US20140177575A1 (en) Method for establishing an application session, device and corresponding notification
CN101783806A (en) Portal certificate authentication method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 518057 Guangdong province Shenzhen city Nanshan District high tech park, No. 9018 North Central Avenue, building A, floor six, Han's innovation

Applicant after: Nubian Technologies Ltd.

Address before: 518057 Guangdong province Shenzhen city Nanshan District high tech park, No. 9018 North Central Avenue, building A, floor six, Han's innovation

Applicant before: Shenzhen ZTE Mobile Tech Co., Ltd.

COR Change of bibliographic data
RJ01 Rejection of invention patent application after publication

Application publication date: 20150527

RJ01 Rejection of invention patent application after publication