[go: up one dir, main page]

CN108880994B - Method and device for retransmitting mails - Google Patents

Method and device for retransmitting mails Download PDF

Info

Publication number
CN108880994B
CN108880994B CN201810709274.6A CN201810709274A CN108880994B CN 108880994 B CN108880994 B CN 108880994B CN 201810709274 A CN201810709274 A CN 201810709274A CN 108880994 B CN108880994 B CN 108880994B
Authority
CN
China
Prior art keywords
mail
target
information
email
failure
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.)
Expired - Fee Related
Application number
CN201810709274.6A
Other languages
Chinese (zh)
Other versions
CN108880994A (en
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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology 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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201810709274.6A priority Critical patent/CN108880994B/en
Publication of CN108880994A publication Critical patent/CN108880994A/en
Application granted granted Critical
Publication of CN108880994B publication Critical patent/CN108880994B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/42Mailbox-related aspects, e.g. synchronisation of mailboxes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/23Reliability checks, e.g. acknowledgments or fault reporting

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for retransmitting mails, belonging to the technical field of data processing. The method comprises the following steps: receiving return information of a mail server to a target mail, and detecting whether the return information carries an error reporting field of mail sending failure; if the return information carries the error report field, recording the mail information of the target mail, and determining the reason of the failure sending of the target mail based on the return information; and retransmitting the target mail according to a preset retransmission strategy corresponding to the reason of the failed transmission and the mail information. The invention can improve the success rate of the retransmission of the mail.

Description

Method and device for retransmitting mails
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for retransmitting a mail.
Background
Electronic mail (hereinafter, referred to simply as "mail") is a communication method for providing information exchange by electronic means, can transmit various information such as characters, images, and sounds, and is widely used in various management systems. The background management system can send various information generated when the management task is executed to the user through the mail.
Taking sending the verification code for logging in the website as an example, the user can select to receive the verification code for logging in through an electronic mailbox on a login interface of the website. In this way, the background management system of the website can receive the login request of the user, and then can send the verification code required by login to the electronic mailbox of the user through the mail based on the mailbox information reserved by the user. Then, the user can search the email carrying the verification code from the email box, so that the verification code can be input in a login interface of the website to log in the website.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
the number of mails sent by the background management system is huge, the mail content of the mails is often not stored, and when a certain mail is found to be failed to send, the generation flow of the mail is difficult to reproduce, so that the background management system is difficult to acquire the mail information of the mail, and the mail cannot be retransmitted based on the mail information. Even if the mail information of the mail is acquired, the background management system only mechanically retransmits the mail, which easily causes a failure in retransmitting the mail.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for retransmitting a mail. The technical scheme is as follows:
in a first aspect, a method for retransmitting a mail is provided, the method comprising:
receiving return information of a mail server to a target mail, and detecting whether the return information carries an error reporting field of mail sending failure;
if the return information carries the error report field, recording the mail information of the target mail, and determining the reason of the failure sending of the target mail based on the return information;
and retransmitting the target mail according to a preset retransmission strategy corresponding to the reason of the failed transmission and the mail information.
Further, the determining the reason for the failure of sending the target email based on the return information includes:
if the return information carries a status code with unknown recipient address, determining that the reason for the failure of sending the target mail is that the recipient address is unknown;
or if the return information carries a state code with an SMTP authentication information error, determining that the reason for the failure of sending the target mail is the SMTP authentication information error;
or if the return information carries an error prompt message that the server is unreachable, determining that the reason for the failure of sending the target mail is that the server is unreachable;
or, if the return information does not carry a status code or an error prompt message, determining that the reason for the failure of sending the target mail is an unknown error.
Further, the retransmitting the target email according to the preset retransmission policy corresponding to the reason of the transmission failure and the email information includes:
if the reason for the failed sending is that the address of the receiver is unknown, determining the unknown address of the target receiver, generating a first alarm instruction for modifying the address of the target receiver, and after receiving the modified address of the target receiver, retransmitting the target mail to the modified address of the target receiver based on the mail information;
or if the reason for the failure transmission is that the SMTP authentication information is wrong, generating a second alarm instruction for modifying the SMTP authentication information, and retransmitting the target mail based on the mail information and the modified SMTP authentication information after receiving the modified SMTP authentication information;
or if the reason for the transmission failure is that the server is not reachable, retransmitting the target mail based on the mail information at a preset retransmission time.
Further, the retransmitting the target email according to the preset retransmission policy corresponding to the reason of the transmission failure and the email information includes:
and if the reason of the failure in sending is an unknown error, generating a third alarm instruction carrying the return information, and retransmitting the target mail based on the mail information after receiving the retransmission instruction.
Further, after the target email is retransmitted according to the preset retransmission policy corresponding to the reason of the failed transmission and the email information, the method further includes:
and if the retransmission times of the target mail exceed the preset times, generating a third alarm instruction carrying the return information, and retransmitting the target mail based on the mail information after receiving the retransmission instruction.
In a second aspect, an apparatus for retransmitting a mail is provided, the apparatus comprising:
the detection module is used for receiving the return information of the mail server to the target mail and detecting whether the return information carries an error report field for the failure of mail sending;
a determining module, configured to record mail information of the target mail if the return information carries the error report field, and determine a reason for a failure in sending the target mail based on the return information;
and the retransmission module is used for retransmitting the target mail according to the preset retransmission strategy corresponding to the reason of the failed transmission and the mail information.
Further, the determining module is further configured to:
if the return information carries a status code with unknown recipient address, determining that the reason for the failure of sending the target mail is that the recipient address is unknown;
or if the return information carries a state code with an SMTP authentication information error, determining that the reason for the failure of sending the target mail is the SMTP authentication information error;
or if the return information carries an error prompt message that the server is unreachable, determining that the reason for the failure of sending the target mail is that the server is unreachable;
or, if the return information does not carry a status code or an error prompt message, determining that the reason for the failure of sending the target mail is an unknown error.
Further, the retransmission module is further configured to:
if the reason for the failed sending is that the address of the receiver is unknown, determining the unknown address of the target receiver, generating a first alarm instruction for modifying the address of the target receiver, and after receiving the modified address of the target receiver, retransmitting the target mail to the modified address of the target receiver based on the mail information;
or if the reason for the failure transmission is that the SMTP authentication information is wrong, generating a second alarm instruction for modifying the SMTP authentication information, and retransmitting the target mail based on the mail information and the modified SMTP authentication information after receiving the modified SMTP authentication information;
or if the reason for the transmission failure is that the server is not reachable, retransmitting the target mail based on the mail information at a preset retransmission time.
Further, the retransmission module is further configured to:
and if the reason of the failure in sending is an unknown error, generating a third alarm instruction carrying the return information, and retransmitting the target mail based on the mail information after receiving the retransmission instruction.
Further, the retransmission module is further configured to:
and if the retransmission times of the target mail exceed the preset times, generating a third alarm instruction carrying the return information, and retransmitting the target mail based on the mail information after receiving the retransmission instruction.
In a third aspect, there is provided a management device comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement the method for retransmitting a mail according to the first aspect.
In a fourth aspect, there is provided a computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement the method of retransmitting mail as described in the first aspect.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in this embodiment, whether the received return information of the mail from the mail server carries an error field or not is detected, so that whether the mail fails to be sent can be determined, and when it is determined that the mail fails to be sent, the status code or the prompt message carried in the return information can be analyzed to determine the reason of the failure of the mail, so that the mail can be retransmitted based on a preset retransmission policy corresponding to the determined reason of the failure of the mail, so that the mail can be retransmitted in a targeted manner, the retransmission success rate of the mail is improved, the mail is prevented from being retransmitted blindly when the reason of the failure of the mail is not solved, and the waste of system resources is reduced. In addition, after the mail sending failure is determined, the mail information of the mail can be recorded in time, so that the mail information of the mail can be acquired without reproducing the generation flow of the mail, the mail does not need to be stored for a long time, and the utilization rate of the storage space of the management equipment is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for retransmitting an email according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for retransmitting an email according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for retransmitting an email according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a management device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The embodiment of the invention provides a method for retransmitting mails, wherein an execution main body of the method can be management equipment in a background management system, the background management system can be a management system which runs in the background of various websites and can be deployed in a machine room of a website owner, and the background management system can manage and maintain various functions of the websites based on preset management rules, such as functions of user information management, log recording, database editing and the like. The management device may be a server in the computer room or a service cluster formed by multiple servers, and may execute various tasks generated by the background management system, such as tasks of sending mails and performing data statistics. The management device may include a processor, a memory, and a transceiver, wherein the processor may be configured to perform a process of retransmitting the mail in the following process, the memory may be configured to store data required and generated in the following process, and the transceiver may be configured to receive and transmit related data in the following process.
The following will describe the processing flow of the method for retransmitting the mail shown in fig. 1 in detail with reference to the specific embodiments, and the contents may be as follows:
step 101: and receiving the return information of the target mail from the mail server, and detecting whether the return information carries an error reporting field for the failure of mail sending.
In implementation, the background management system can push various types of information, such as user birthday reminders, latest product information, consumption records and the like, to a plurality of users through mails. When information needs to be sent to a user, the background management system can generate a corresponding mail sending task, and then the mail sending task is sent to the management equipment to be executed. In this way, the management device may receive the mail sending task, and then may generate a corresponding mail (which may be referred to as a target mail) according to the information carried by the task and the address of the recipient receiving the information, and send the target mail to the mail server. Then, the mail server may send the target mail to the electronic mailbox of the user according to the address of the recipient in the target mail, and at the same time, the mail server may also send information (which may be referred to as return information) related to the sending state of the target mail to the management device, where the return information may include a normal field identifying normal sending of the mail, an error-reporting field identifying failure of sending the mail, various status codes or prompt messages, such as a normal field normal, an error-reporting field error, and a status code unknown to the recipient. Therefore, after sending the target mail, the management device can receive the return information of the target mail sent by the mail server, and then the management device can judge whether the target mail fails to be sent by detecting whether the return information carries an error reporting field for mail sending failure.
Step 102: and if the return information carries an error report field, recording the mail information of the target mail, and determining the reason of the failure sending of the target mail based on the return information.
In implementation, after sending the target mail, the management device may temporarily store the target mail, and if the target mail is successfully sent, the management device may detect a normal field in the return information, and further, the management device may delete the temporarily stored target mail; if the target mail fails to be sent, the management device detects an error field in the return information, and further the management device can completely record the mail information of the target mail based on the temporarily stored target mail, for example, the mail information such as the mail subject, the mail text, the recipient address and the like of the target mail is recorded by adopting a Base64 encoding and decoding mode, so as to facilitate the subsequent retransmission processing of the target mail. After the mail information of the target mail is recorded, the management device can delete the temporarily stored target mail, so that the target mail does not need to be stored for a long time, the utilization rate of the storage space of the management device is reduced, and the mail content of the target mail does not need to be acquired by repeating the generation flow of the target mail. It should be noted that, only the mail information of the target mail is recorded, instead of continuously storing the target mail, because the data volume of the recorded mail information is small relative to the data volume of the target mail itself, the usage rate of the storage space of the management device can be further reduced, and the management device can easily regenerate the target mail through the recorded mail information. Meanwhile, the management equipment can analyze other information except the error report field in the returned information, and further can determine the reason of the failure sending of the target mail.
Optionally, the management device may determine the reason for the failed sending of the target email based on the status code or the prompt message in the return message, and accordingly, part of the processing of step 102 may be as follows: if the returned information carries the status code of which the address of the receiver is unknown, determining that the reason of the failure sending of the target mail is that the address of the receiver is unknown; or if the returned information carries a status code with an error in the SMTP (Simple Mail Transfer Protocol) authentication information, determining that the reason for the failure in sending the target Mail is the error in the SMTP authentication information; or if the returned information carries an error prompt message that the server is unreachable, determining that the reason for the failure of sending the target mail is that the server is unreachable; or if the return information does not carry the status code or the error prompt message, determining that the reason of the failure of sending the target mail is an unknown error.
In implementation, when the mail transmission fails, the mail server may send the return information carrying the status code or the prompt message identifying the reason of the transmission failure to the management device. In this way, the management apparatus can determine the reason for the transmission failure of the target mail based on the return information. Specifically, if the management device detects that the return message carries a status code with an unknown recipient address, such as a status code 550 commonly used by a mail server, the status code 550 may identify that the recipient address is unknown due to the absence of the recipient address or a wrong recipient address filling, and then the management device may determine that the reason for the failure in sending the target mail is that the recipient address is unknown. If the management device detects that the return information carries a status code with an SMTP authentication information error, such as a status code 535 usually adopted by a mail server, and the status code 535 can identify the SMTP authentication information error caused by an SMTP authentication information setting error, the management device may determine that the reason for the failure in sending the target mail is the SMTP authentication information error; if the management device detects that the return information carries an error prompt message that the server is unreachable, such as a Cannot connect to relay host, the management device may determine that the reason for the failure in sending the target email is that the server is unreachable. Further, if the management device detects that the return information does not carry the status code or the error prompt message, the management device may record the reason for the failure in sending the target email as an unknown error.
Step 103: and retransmitting the target mail according to the preset retransmission strategy and the mail information corresponding to the reason of the transmission failure.
In implementation, a technician may preset corresponding retransmission policies for different transmission failure reasons, and then deploy the preset retransmission policies to the management device. In this way, after determining the reason for the failure of sending the target email, the management device may obtain the preset retransmission policy corresponding to the reason for the failure of sending the target email, and then the management device may retransmit the target email according to the preset retransmission policy in combination with the recorded email information.
Alternatively, when the reason for the failed transmission is that the recipient is unknown, the process of step 103 may be as follows: and if the reason of the failed sending is that the address of the receiver is unknown, determining the unknown address of the target receiver, generating a first alarm instruction for modifying the address of the target receiver, and retransmitting the target mail to the modified address of the target receiver based on the mail information after receiving the modified address of the target receiver.
In implementation, for the case that the reason for the failed transmission is that the address of the recipient is unknown, the mail server may carry a status code that the address of the recipient is unknown and a corresponding address of the recipient in the return message. In this way, after determining that the reason for the failure in sending the target email is that the address of the recipient is unknown, the management device may determine the address of the recipient carried in the return message as the unknown address of the target recipient, and then the management device may generate a first warning instruction for modifying the address of the target recipient, so as to notify a technician of modifying the address of the target recipient. After receiving the notification, a technician may modify the target recipient address in the management device, and after the modification is completed, the management device may receive the modified target recipient address, and then the management device may regenerate the target mail based on the recorded mail information and retransmit the target mail to the modified target recipient address, so that the target mail may be retransmitted in a targeted manner, and a failure in retransmitting the target mail due to an insignificant retransmission according to an unknown recipient address is avoided. Further, for the condition that the target mail has a plurality of recipient addresses, the management device can only retransmit the target mail to the recipient address with failed sending, so that the accurate delivery of the target mail can be realized, the target mail is prevented from being retransmitted to all the recipient addresses mechanically, and the user experience can be improved.
Alternatively, when the transmission failure cause is an error of the SMTP authentication information, the process of step 103 may be as follows: and if the reason for the transmission failure is that the SMTP authentication information is wrong, generating a second alarm instruction for modifying the SMTP authentication information, and retransmitting the target mail based on the mail information and the modified SMTP authentication information after receiving the modified SMTP authentication information.
In implementation, after determining that the reason for the failure of sending the target mail is the error of the SMTP authentication information, the management device may generate a second warning instruction for modifying the SMTP authentication information to notify a technician of modifying the SMTP authentication information. After receiving the notification, the technician may modify the SMTP authentication information in the management device, after the modification is completed, the management device may receive the modified SMTP authentication information, and then may regenerate the target mail based on the recorded mail information, and further the management device may retransmit the target mail according to the modified SMTP authentication information, so that the target mail may be retransmitted in a targeted manner, and therefore, a failure of retransmitting the target mail due to an insignificant retransmission of the mail according to the incorrect SMTP authentication information is avoided.
Alternatively, when the reason for the transmission failure is that the server is not reachable, the processing of step 103 may be as follows: and if the reason of the transmission failure is that the server is not reachable, retransmitting the target mail based on the mail information at the preset retransmission time.
In implementation, after determining that the reason for the failure of sending the target email is that the server is not reachable, the management device may resend the target email at a preset resending time, for example, the fifth minute or ten minutes after determining the reason for the failure of sending the target email, so that system resource waste caused by uninterrupted resending of the target email by the management device may be avoided.
Alternatively, when the cause of the transmission failure is an unknown error, the process of step 103 may be as follows: and if the reason of the sending failure is an unknown error, generating a third alarm instruction carrying return information, and retransmitting the target mail based on the mail information after receiving the retransmission instruction.
In implementation, after determining that the reason for the failure of sending the target email is an unknown error, the management device may generate an alarm instruction carrying the return information to notify a technician to perform detailed analysis on the return information, and after receiving the notification, the technician may perform comprehensive investigation to determine a specific reason for the failure of sending. After resolving the failure causing the transmission failure, the technician may input a retransmission instruction for the target email to the management device, for example, the technician may reset the transmission information of the target email on the WEB visual management interface, and click a retransmission button after the setting is completed. In this way, the management device may receive the retransmission instruction, and then may regenerate the target mail based on the recorded mail information, and retransmit the target mail, it should be noted that, since the technician performs detailed troubleshooting on the unknown error and solves the failure causing the transmission failure, the management device may achieve successful retransmission of the target mail. Therefore, the target mail can be retransmitted in a targeted manner, blind retransmission of the target mail when the reason of transmission failure is not solved is avoided, and waste of system resources is reduced.
The above-described process for the management apparatus to retransmit the target mail can be referred to fig. 2.
Optionally, if the target email fails to be retransmitted for multiple times, the processing may be performed according to the above flow that the reason of the transmission failure is an unknown error, and the corresponding processing may be as follows: and if the retransmission times of the target mail exceed the preset times, generating an alarm instruction carrying return information, and retransmitting the target mail based on the mail information after receiving the retransmission instruction.
In the implementation, for the reason of the sending failure of the unknown error, such as unknown recipient address, error of SMTP authentication information, or unreachable server, if the target email fails to be sent again, the management device may record the number of times of sending the target email, and may receive the return information of the mail server to the target email again, and then the management device may continue to process the target email according to step 101 and 103, if the sending failure reason determined again is still the reason of the sending failure of the unknown error, the sending failure may be sent again, for example, when the sending failure reason is unreachable server, the target email may be sent again and failed many times. In this way, the management device may determine whether the recorded retransmission times of the target email exceed a preset number of times, for example, three or five times, and if the recorded retransmission times exceed the preset number of times, the management device may generate an alarm instruction carrying the return information to notify a technician to perform detailed analysis on the return information, and after receiving the notification, the technician may perform comprehensive investigation to determine a specific reason for the transmission failure. After resolving the failure causing the transmission failure, the technician may input a retransmission instruction for the target mail to the management device, so that the management device may receive the retransmission instruction, and then may regenerate and retransmit the target mail based on the above-mentioned recorded mail information, so that the management device may achieve successful retransmission of the target mail.
In this embodiment, whether the received return information of the mail from the mail server carries an error field or not is detected, so that whether the mail fails to be sent can be determined, and when it is determined that the mail fails to be sent, the status code or the prompt message carried in the return information can be analyzed to determine the reason of the failure of the mail, so that the mail can be retransmitted based on a preset retransmission policy corresponding to the determined reason of the failure of the mail, so that the mail can be retransmitted in a targeted manner, the retransmission success rate of the mail is improved, the mail is prevented from being retransmitted blindly when the reason of the failure of the mail is not solved, and the waste of system resources is reduced. In addition, after the mail sending failure is determined, the management equipment can record the mail information of the mail in time, so that the mail information of the mail can be acquired without reproducing the generation flow of the mail, the mail does not need to be stored for a long time, and the utilization rate of the storage space of the management equipment is reduced.
Based on the same technical concept, an embodiment of the present invention further provides an apparatus for retransmitting a mail, as shown in fig. 3, the apparatus includes:
the detection module 301 is configured to receive return information of a target email from an email server, and detect whether the return information carries an error reporting field indicating that the email has failed to be sent;
a determining module 302, configured to record mail information of the target mail if the return information carries the error report field, and determine a reason for a failure in sending the target mail based on the return information;
a retransmitting module 303, configured to retransmit the target email according to the preset retransmission policy corresponding to the reason of the failed transmission and the email information.
Optionally, the determining module 302 is further configured to:
if the return information carries a status code with unknown recipient address, determining that the reason for the failure of sending the target mail is that the recipient address is unknown;
or if the return information carries a state code with an SMTP authentication information error, determining that the reason for the failure of sending the target mail is the SMTP authentication information error;
or if the return information carries an error prompt message that the server is unreachable, determining that the reason for the failure of sending the target mail is that the server is unreachable;
or, if the return information does not carry a status code or an error prompt message, determining that the reason for the failure of sending the target mail is an unknown error.
Optionally, the retransmission module 303 is further configured to:
if the reason for the failed sending is that the address of the receiver is unknown, determining the unknown address of the target receiver, generating a first alarm instruction for modifying the address of the target receiver, and after receiving the modified address of the target receiver, retransmitting the target mail to the modified address of the target receiver based on the mail information;
or if the reason for the failure transmission is that the SMTP authentication information is wrong, generating a second alarm instruction for modifying the SMTP authentication information, and retransmitting the target mail based on the mail information and the modified SMTP authentication information after receiving the modified SMTP authentication information;
or if the reason for the transmission failure is that the server is not reachable, retransmitting the target mail based on the mail information at a preset retransmission time.
Optionally, the retransmission module 303 is further configured to:
and if the reason of the failure in sending is an unknown error, generating a third alarm instruction carrying the return information, and retransmitting the target mail based on the mail information after receiving the retransmission instruction.
Optionally, the retransmission module 303 is further configured to:
and if the retransmission times of the target mail exceed the preset times, generating a third alarm instruction carrying the return information, and retransmitting the target mail based on the mail information after receiving the retransmission instruction.
In this embodiment, whether the received return information of the mail from the mail server carries an error field or not is detected, so that whether the mail fails to be sent can be determined, and when it is determined that the mail fails to be sent, the status code or the prompt message carried in the return information can be analyzed to determine the reason of the failure of the mail, so that the mail can be retransmitted based on a preset retransmission policy corresponding to the determined reason of the failure of the mail, so that the mail can be retransmitted in a targeted manner, the retransmission success rate of the mail is improved, the mail is prevented from being retransmitted blindly when the reason of the failure of the mail is not solved, and the waste of system resources is reduced. In addition, after the mail sending failure is determined, the management equipment can record the mail information of the mail in time, so that the mail information of the mail can be acquired without reproducing the generation flow of the mail, the mail does not need to be stored for a long time, and the utilization rate of the storage space of the management equipment is reduced.
Fig. 4 is a schematic structural diagram of a management device according to an embodiment of the present invention. The management device 400 may vary significantly due to configuration or performance differences and may include one or more central processors 422 (e.g., one or more processors) and memory 432, one or more storage media 430 (e.g., one or more mass storage devices) storing applications 442 or data 444. Wherein the memory 432 and storage medium 430 may be transient or persistent storage. The program stored on the storage medium 430 may include one or more modules (not shown), each of which may include a series of instruction operations for the management device. Still further, the central processor 422 may be arranged to communicate with the storage medium 430, and execute a series of instruction operations in the storage medium 430 on the management device 400.
The management apparatus 400 may also include one or more power supplies 426, one or more wired or wireless network interfaces 450, one or more input-output interfaces 458, one or more keyboards 456, and/or one or more operating systems 441, such as Windows Server (TM), Mac OS XTM, Unix (TM), Linux (TM), FreeBSD (TM), and the like.
The management apparatus 400 may include a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing the above-described resending of the mail.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (12)

1.一种重发邮件的方法,其特征在于,所述方法包括:1. A method for resending an email, the method comprising: 接收邮件服务器对目标邮件的返回信息,检测所述返回信息中是否携带有邮件发送失败的报错字段,其中,管理设备于所述邮件服务器将所述目标邮件发送给用户的同时接收所述邮件服务器对目标邮件的返回信息;Receive the information returned by the mail server to the target mail, and detect whether the returned information carries an error field indicating that mail sending failed, wherein the management device receives the mail server when the mail server sends the target mail to the user. Return information to the target mail; 如果所述返回信息中携带有所述报错字段,则记录所述目标邮件的邮件信息,并基于所述返回信息确定所述目标邮件的发送失败原因,待记录完成所述目标邮件的邮件信息之后,所述管理设备将临时存储的所述目标邮件删除;If the returned information carries the error reporting field, record the mail information of the target mail, and determine the reason for the failure to send the target mail based on the returned information. After the mail information of the target mail is recorded, , the management device deletes the temporarily stored target mail; 根据所述发送失败原因对应的预设重发策略和所述邮件信息对所述目标邮件进行重发。The target email is resent according to the preset resending policy corresponding to the sending failure reason and the email information. 2.根据权利要求1所述的方法,其特征在于,所述基于所述返回信息确定所述目标邮件的发送失败原因,包括:2. The method according to claim 1, wherein the determining of the failure reason for sending the target email based on the returned information comprises: 如果所述返回信息中携带有收件人地址未知的状态码,则确定所述目标邮件的发送失败原因是收件人地址未知;If the returned information carries a status code with an unknown recipient address, it is determined that the failure reason for sending the target mail is that the recipient address is unknown; 或者,如果所述返回信息中携带有SMTP认证信息错误的状态码,则确定所述目标邮件的发送失败原因是SMTP认证信息错误;Or, if the status code of the SMTP authentication information error is carried in the returned information, then it is determined that the sending failure reason of the target mail is the SMTP authentication information error; 或者,如果所述返回信息中携带有服务器不可达的错误提示消息,则确定所述目标邮件的发送失败原因是服务器不可达;Or, if the returned information carries an error message indicating that the server is unreachable, it is determined that the failure to send the target email is because the server is unreachable; 或者,如果所述返回信息中未携带有状态码或错误提示消息,则确定所述目标邮件的发送失败原因是未知错误。Alternatively, if the returned information does not carry a status code or an error prompt message, it is determined that the reason for the failure to send the target email is an unknown error. 3.根据权利要求2所述的方法,其特征在于,所述根据所述发送失败原因对应的预设重发策略和所述邮件信息对所述目标邮件进行重发,包括:3. The method according to claim 2, wherein the retransmission of the target email according to the preset retransmission policy corresponding to the transmission failure reason and the email information comprises: 如果所述发送失败原因是收件人地址未知,则确定未知的目标收件人地址,生成修改目标收件人地址的第一告警指令,并在接收到修改后的目标收件人地址后,基于所述邮件信息将所述目标邮件重发至修改后的目标收件人地址;If the sending failure reason is that the recipient address is unknown, determine the unknown target recipient address, generate a first alarm instruction for modifying the target recipient address, and after receiving the modified target recipient address, Resend the target email to the modified target recipient address based on the email information; 或者,如果所述发送失败原因是SMTP认证信息错误,则生成修改SMTP认证信息的第二告警指令,并在接收到修改后的SMTP认证信息后,基于所述邮件信息和修改后的SMTP认证信息对所述目标邮件进行重发;Or, if the reason for the failure to send is that the SMTP authentication information is incorrect, a second alarm instruction for modifying the SMTP authentication information is generated, and after receiving the modified SMTP authentication information, based on the email information and the modified SMTP authentication information retransmitting the target email; 或者,如果所述发送失败原因是服务器不可达,则在预设重发时间基于所述邮件信息对所述目标邮件进行重发。Or, if the reason for the failure to send is that the server is unreachable, the target email is retransmitted based on the email information at a preset retransmission time. 4.根据权利要求2所述的方法,其特征在于,所述根据所述发送失败原因对应的预设重发策略和所述邮件信息对所述目标邮件进行重发,包括:4. The method according to claim 2, wherein the retransmission of the target email according to the preset retransmission policy corresponding to the transmission failure reason and the email information comprises: 如果所述发送失败原因是未知错误,则生成携带有所述返回信息的第三告警指令,并在接收到重发指令后,基于所述邮件信息对所述目标邮件进行重发。If the reason for the failure to send is an unknown error, a third alarm instruction carrying the return information is generated, and after receiving the retransmission instruction, the target email is retransmitted based on the email information. 5.根据权利要求3所述的方法,其特征在于,所述根据所述发送失败原因对应的预设重发策略和所述邮件信息对所述目标邮件进行重发之后,还包括:5. The method according to claim 3, characterized in that, after retransmitting the target email according to the preset retransmission policy corresponding to the sending failure reason and the email information, the method further comprises: 如果所述目标邮件的重发次数超过预设次数,则生成携带有所述返回信息的第三告警指令,并在接收到重发指令后,基于所述邮件信息对所述目标邮件进行重发。If the number of retransmissions of the target email exceeds the preset number of times, a third alarm instruction carrying the return information is generated, and after receiving the retransmission instruction, the target email is retransmitted based on the email information . 6.一种重发邮件的装置,其特征在于,所述装置包括:6. A device for resending an email, wherein the device comprises: 检测模块,用于接收邮件服务器对目标邮件的返回信息,检测所述返回信息中是否携带有邮件发送失败的报错字段,其中,管理设备于所述邮件服务器将所述目标邮件发送给用户的同时接收所述邮件服务器对目标邮件的返回信息;The detection module is used for receiving the return information of the mail server to the target mail, and detecting whether the returned information carries an error reporting field that the mail sending fails, wherein the management device sends the target mail to the user when the mail server sends the target mail to the user. receiving the information returned by the mail server to the target mail; 确定模块,用于如果所述返回信息中携带有所述报错字段,则记录所述目标邮件的邮件信息,并基于所述返回信息确定所述目标邮件的发送失败原因,待记录完成所述目标邮件的邮件信息之后,所述管理设备将临时存储的所述目标邮件删除;A determination module, configured to record the mail information of the target mail if the error report field is carried in the returned information, and determine the reason for the failure to send the target mail based on the returned information, and wait for the record to complete the target mail. After the mail information of the mail, the management device deletes the temporarily stored target mail; 重发模块,用于根据所述发送失败原因对应的预设重发策略和所述邮件信息对所述目标邮件进行重发。A resending module, configured to resend the target email according to the preset resending policy corresponding to the sending failure reason and the email information. 7.根据权利要求6所述的装置,其特征在于,所述确定模块还用于:7. The apparatus according to claim 6, wherein the determining module is further configured to: 如果所述返回信息中携带有收件人地址未知的状态码,则确定所述目标邮件的发送失败原因是收件人地址未知;If the returned information carries a status code with an unknown recipient address, it is determined that the failure reason for sending the target mail is that the recipient address is unknown; 或者,如果所述返回信息中携带有SMTP认证信息错误的状态码,则确定所述目标邮件的发送失败原因是SMTP认证信息错误;Or, if the status code of the SMTP authentication information error is carried in the returned information, then it is determined that the sending failure reason of the target mail is the SMTP authentication information error; 或者,如果所述返回信息中携带有服务器不可达的错误提示消息,则确定所述目标邮件的发送失败原因是服务器不可达;Or, if the returned information carries an error message indicating that the server is unreachable, it is determined that the failure to send the target email is because the server is unreachable; 或者,如果所述返回信息中未携带有状态码或错误提示消息,则确定所述目标邮件的发送失败原因是未知错误。Alternatively, if the returned information does not carry a status code or an error prompt message, it is determined that the reason for the failure to send the target email is an unknown error. 8.根据权利要求7所述的装置,其特征在于,所述重发模块还用于:8. The apparatus according to claim 7, wherein the retransmission module is further configured to: 如果所述发送失败原因是收件人地址未知,则确定未知的目标收件人地址,生成修改目标收件人地址的第一告警指令,并在接收到修改后的目标收件人地址后,基于所述邮件信息将所述目标邮件重发至修改后的目标收件人地址;If the sending failure reason is that the recipient address is unknown, determine the unknown target recipient address, generate a first alarm instruction for modifying the target recipient address, and after receiving the modified target recipient address, Resend the target email to the modified target recipient address based on the email information; 或者,如果所述发送失败原因是SMTP认证信息错误,则生成修改SMTP认证信息的第二告警指令,并在接收到修改后的SMTP认证信息后,基于所述邮件信息和修改后的SMTP认证信息对所述目标邮件进行重发;Or, if the reason for the failure to send is that the SMTP authentication information is incorrect, a second alarm instruction for modifying the SMTP authentication information is generated, and after receiving the modified SMTP authentication information, based on the email information and the modified SMTP authentication information retransmitting the target email; 或者,如果所述发送失败原因是服务器不可达,则在预设重发时间基于所述邮件信息对所述目标邮件进行重发。Or, if the reason for the failure to send is that the server is unreachable, the target email is retransmitted based on the email information at a preset retransmission time. 9.根据权利要求7所述的装置,其特征在于,所述重发模块还用于:9. The apparatus according to claim 7, wherein the retransmission module is further configured to: 如果所述发送失败原因是未知错误,则生成携带有所述返回信息的第三告警指令,并在接收到重发指令后,基于所述邮件信息对所述目标邮件进行重发。If the reason for the failure to send is an unknown error, a third alarm instruction carrying the return information is generated, and after receiving the retransmission instruction, the target email is retransmitted based on the email information. 10.根据权利要求8所述的装置,其特征在于,所述重发模块还用于:10. The apparatus according to claim 8, wherein the retransmission module is further configured to: 如果所述目标邮件的重发次数超过预设次数,则生成携带有所述返回信息的第三告警指令,并在接收到重发指令后,基于所述邮件信息对所述目标邮件进行重发。If the number of retransmissions of the target email exceeds the preset number of times, a third alarm instruction carrying the return information is generated, and after receiving the retransmission instruction, the target email is retransmitted based on the email information . 11.一种管理设备,其特征在于,所述管理设备包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如权利要求1至5任一所述的重发邮件的方法。11. A management device, characterized in that, the management device comprises a processor and a memory, and the memory stores at least one instruction, at least a piece of program, code set or instruction set, the at least one instruction, the at least one A piece of program, the code set or the instruction set is loaded and executed by the processor to implement the method for resending an email according to any one of claims 1 to 5. 12.一种计算机可读存储介质,其特征在于,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如权利要求1至5任一所述的重发邮件的方法。12. A computer-readable storage medium, wherein the storage medium stores at least one instruction, at least one piece of program, code set or instruction set, the at least one instruction, the at least one piece of program, the code The set or instruction set is loaded and executed by the processor to implement the method for resending an email as claimed in any one of claims 1 to 5 .
CN201810709274.6A 2018-07-02 2018-07-02 Method and device for retransmitting mails Expired - Fee Related CN108880994B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810709274.6A CN108880994B (en) 2018-07-02 2018-07-02 Method and device for retransmitting mails

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810709274.6A CN108880994B (en) 2018-07-02 2018-07-02 Method and device for retransmitting mails

Publications (2)

Publication Number Publication Date
CN108880994A CN108880994A (en) 2018-11-23
CN108880994B true CN108880994B (en) 2021-05-25

Family

ID=64298124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810709274.6A Expired - Fee Related CN108880994B (en) 2018-07-02 2018-07-02 Method and device for retransmitting mails

Country Status (1)

Country Link
CN (1) CN108880994B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905930B (en) * 2019-12-04 2024-09-20 北京沃东天骏信息技术有限公司 Interface request retransmission method and device
CN111245934A (en) * 2020-01-10 2020-06-05 深圳壹账通智能科技有限公司 Feedback method, device and equipment for file transmission and storage medium
CN115544034A (en) * 2022-09-15 2022-12-30 中国人民财产保险股份有限公司 Data consistency method and service system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101103596A (en) * 2004-12-03 2008-01-09 捷讯研究有限公司 Method and apparatus for efficiently managing 'messages sent' file and resending of messages from mobile wireless communication device
US20130227430A1 (en) * 2012-02-24 2013-08-29 Samsung Electronics Co., Ltd. Apparatus and method for displaying an e-mail in a portable terminal
US20130262589A1 (en) * 2012-03-27 2013-10-03 Microsoft Corporation Communicating per-recipient delivery statuses of multi-recipient messages in multiline simple mail transfer protocol responses
CN103607339A (en) * 2013-09-11 2014-02-26 北京京东尚科信息技术有限公司 Method and system based on content automatic adjustment mail sending strategy
CN106571995A (en) * 2015-10-13 2017-04-19 北京国双科技有限公司 Mail sending method and device
CN107666430A (en) * 2016-07-27 2018-02-06 中兴通讯股份有限公司 A kind of E-mail sending method, device and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101103596A (en) * 2004-12-03 2008-01-09 捷讯研究有限公司 Method and apparatus for efficiently managing 'messages sent' file and resending of messages from mobile wireless communication device
US20130227430A1 (en) * 2012-02-24 2013-08-29 Samsung Electronics Co., Ltd. Apparatus and method for displaying an e-mail in a portable terminal
US20130262589A1 (en) * 2012-03-27 2013-10-03 Microsoft Corporation Communicating per-recipient delivery statuses of multi-recipient messages in multiline simple mail transfer protocol responses
CN103607339A (en) * 2013-09-11 2014-02-26 北京京东尚科信息技术有限公司 Method and system based on content automatic adjustment mail sending strategy
CN106571995A (en) * 2015-10-13 2017-04-19 北京国双科技有限公司 Mail sending method and device
CN107666430A (en) * 2016-07-27 2018-02-06 中兴通讯股份有限公司 A kind of E-mail sending method, device and terminal

Also Published As

Publication number Publication date
CN108880994A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
JP6686033B2 (en) Method and apparatus for pushing messages
JP5872731B2 (en) Computer implemented method, non-transitory computer readable medium and computer system for communicating detection of link failure to each of a plurality of nodes of a cluster
CN109714409B (en) Message management method and system
CN108880994B (en) Method and device for retransmitting mails
CN111158933A (en) Distributed transaction processing method and system based on message queue
US8407329B2 (en) Reporting information to a network
CN111416823A (en) Data transmission method and device
US9742642B2 (en) Monitoring SMS messages related to server/customer interactions
CN104348661B (en) The upload of network failure data, method of reseptance and equipment and recording method and system
CN108696831B (en) Short message sending method and device
CN111314443A (en) Node processing method, device and device and medium based on distributed storage system
CN114827017B (en) Communication method and device of Kafka cluster, electronic equipment and storage medium
EP2381630B1 (en) Monitoring a mobile data service associated with a mailbox
US8055991B2 (en) Error detection and recovery using an asynchronous transaction journal
CN106254445A (en) Message sending method and server
CN118193238A (en) Service information processing method, device, equipment and storage medium
CN113961372B (en) A method and device for sending MQ multi-instance messages
CN110521233A (en) Network failure discovery
US8352553B2 (en) Electronic mail connector
CN111552907A (en) Message processing method, device, equipment and storage medium
EP1662704A2 (en) Monitoring system, apparatus to be monitored, monitoring apparatus and monitoring method
US12199889B2 (en) Unidirectional gateway mediated delivery of data messages
JP2019193202A (en) One-way communication device, one-way communication method, and one-way communication program
CN118540662A (en) High-availability short message service method and device, medium and equipment
CN118779142A (en) An exception handling method, system, terminal device and storage medium for Android application

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210525

CF01 Termination of patent right due to non-payment of annual fee