CN116308236A - Mail processing method, mail processing device, electronic equipment and storage medium - Google Patents

Mail processing method, mail processing device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116308236A
CN116308236A CN202310185379.7A CN202310185379A CN116308236A CN 116308236 A CN116308236 A CN 116308236A CN 202310185379 A CN202310185379 A CN 202310185379A CN 116308236 A CN116308236 A CN 116308236A
Authority
CN
China
Prior art keywords
mail
sent
sending
processing
template
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
CN202310185379.7A
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.)
Bank of China Financial Technology Co Ltd
Original Assignee
Bank of China Financial 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 Bank of China Financial Technology Co Ltd filed Critical Bank of China Financial Technology Co Ltd
Priority to CN202310185379.7A priority Critical patent/CN116308236A/en
Publication of CN116308236A publication Critical patent/CN116308236A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/107Computer-aided management of electronic mailing [e-mailing]

Abstract

The invention provides a mail processing method, a mail processing device, electronic equipment and a storage medium, and relates to the technical field of communication, wherein the mail processing method comprises the following steps: receiving a first mail sending request, and analyzing the service type, the mail content and the sending requirement of the mail to be sent from the first mail sending request; the first mail sending request is a mail sending request input through the client; acquiring a mail template corresponding to the service type, and configuring mail content into the mail template to obtain a mail to be sent; and calling a target processing component corresponding to the sending requirement, executing mail processing logic in the target processing component to the mails to be sent, and sending the mails to be sent according to the processing result, so that the configuration processing of mail contents is realized, the mails are flexibly sent according to the service requirement by writing a small amount of necessary codes, the processing efficiency is greatly improved, the redundant work is reduced, and the manpower and material resources are saved.

Description

Mail processing method, mail processing device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a mail processing method, a device, an electronic device, and a storage medium.
Background
In a business system, mail notification is an indispensable function. It is often necessary to send mail notifications to the relevant personnel so that the relevant personnel can perform relevant business processes in time according to the notification mail.
In a general service system, there are different mail notification requirements for different services, that is, when the mail notification needs to be performed for different recipients, mail contents, sending time, and the like. Under the scene, a corresponding mail sending interface is generally written aiming at each service function, fixed recipients, mail content, sending time and the like are written in an interface code, and a third-party server interface is called to send the mail, so that the flexibility is poor; when the business function involves small changes, the code needs to be rewritten, so that the rewritten redundant code is more, and the processing efficiency is greatly affected.
Disclosure of Invention
The invention provides a mail processing method, a device, electronic equipment and a storage medium, which are used for solving the defects of poor flexibility and low mail processing efficiency of the prior art that corresponding mail sending interfaces are compiled aiming at each service function, and realizing flexible and efficient mail processing.
The invention provides a mail processing method, which comprises the following steps:
receiving a first mail sending request, and analyzing the service type, the mail content and the sending requirement of the mail to be sent from the first mail sending request; the first mail sending request is a mail sending request input through a client;
acquiring a mail template corresponding to the service type, and configuring the mail content into the mail template to obtain the mail to be sent;
and calling a target processing component corresponding to the sending requirement, executing mail processing logic in the target processing component on the mail to be sent, and sending the mail to be sent according to a processing result.
According to the mail processing method provided by the invention, the mail to be sent is sent according to the processing result, and the mail processing method comprises the following steps:
when the processing result is that the mail to be sent meets the mail sending condition, calling a mail sending function, and processing the mail to be sent to obtain a second mail sending request;
transmitting the second mail sending request to a target server, so that the target server sends the mail to be sent according to the second mail sending request;
Wherein the processing includes data loading, data encryption and data encapsulation;
the mail sending condition comprises that the sending time reaches the preset sending time and/or the state of the sending channel is an open state.
According to the mail processing method provided by the invention, the target processing assembly comprises one or more of a first processing assembly, a second processing assembly and a third processing assembly;
the first processing component is used for judging the state of the sending channel of the mail to be sent;
the second processing component is used for judging the sending time of the mail to be sent;
and the third processing component is used for judging the checking state of the mail to be sent.
According to the mail processing method provided by the invention, the target processing component corresponding to the sending requirement is called, and the mail processing logic in the target processing component is executed on the mail to be sent, and the mail processing method comprises the following steps:
invoking the first processing component to judge the state of the sending channel of the mail to be sent;
under the condition that the state of the sending channel is determined to be an open state, the second processing component is called, and the sending time of the mail to be sent is judged;
Under the condition that the sending time of the mail to be sent meets the preset sending time, checking the mail content of the mail to be sent;
and under the condition that the field of the state to be checked exists in the mail to be sent, adding a mail receiving object of the mail to be sent in a mail sending object column of the mail to be sent.
According to the mail processing method provided by the invention, the mail content is configured in the mail template to obtain the mail to be sent, which comprises the following steps:
matching each field in the mail content with each target field in the mail template;
determining the configuration position of the parameter value of each field in the mail template according to the position of the parameter to be configured of the target field matched with each field;
and configuring the parameter values of the fields into the mail template according to the configuration positions to obtain the mail to be sent.
According to the mail processing method provided by the invention, the mail template corresponding to the service type is obtained, which comprises the following steps:
searching the mail template in a database according to the function identifier and/or the name identifier corresponding to the service type;
The database comprises mapping relations between each service type and each mail template, which are constructed in advance according to function identifiers and/or name identifiers corresponding to each service type.
The invention also provides a mail processing device, which comprises:
the receiving module is used for receiving a first mail sending request, and analyzing the service type, the mail content and the sending requirement of the mail to be sent from the first mail sending request; the first mail sending request is a mail sending request input through a client;
the configuration module is used for acquiring a mail template corresponding to the service type, and configuring the mail content into the mail template to obtain the mail to be sent;
and the processing module is used for calling a target processing component corresponding to the sending requirement, executing mail processing logic in the target processing component on the mail to be sent, and sending the mail to be sent according to a processing result.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the mail processing method as described above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a mail processing method as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a mail processing method as described in any of the above.
According to the mail processing method, the mail processing device, the electronic equipment and the storage medium, the service type, the mail content and the sending requirement of the mail to be sent are obtained by analyzing the first mail sending request input from the client side; then, acquiring a corresponding mail template according to the service type and configuring mail content in the mail template to obtain a mail to be sent; and finally, executing mail processing logic in the target processing component to the mail to be sent to obtain a processing result, and completing the sending of the mail to be sent according to the processing result, thereby realizing the configuration processing of mail contents, flexibly sending the mail according to service requirements by writing a small amount of necessary codes, greatly improving the processing efficiency, reducing redundant work and saving manpower and material resources.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a mail processing method provided by the invention;
FIG. 2 is a schematic flow chart of mail processing logic for executing mail to be sent provided by the present invention;
FIG. 3 is a schematic diagram of the mail processing apparatus according to the present invention;
fig. 4 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The method may be performed by an electronic device, a component in an electronic device, an integrated circuit, or a chip. The electronic device may be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a cell phone, tablet computer, notebook computer, palm computer, vehicle mounted electronic device, wearable device, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook or personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device may be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., without limitation of the present invention.
In a business system, there is often a scenario that needs to send a mail notification to a related trunk system, and there are different mail sending requirements for different businesses, so the mail notification is an indispensable function. In the prior art, a corresponding mail sending interface is generally written for each mail function, wherein fixed recipients, mail contents and the like are designated to meet the requirements of different recipients, mail contents, sending time and the like, and then a third party server interface is called to send the mail, so that the configuration flexibility based on different business rules is lacking, and if the configuration is related, the codes are required to be modified again, so that redundant codes are more, the codes required to be repeatedly written are more, and the efficiency is greatly influenced.
Therefore, in view of the above-described problems, the present embodiment proposes a mail processing method. The mail processing method of the present invention is described below with reference to fig. 1, and the purpose of the present invention is to implement mail configurability, and on the premise of existing third party mail servers, the core mail sending related method is extracted as a public part, so as to support users to configure information such as senders, copy persons, mail subjects, mail texts, etc. by themselves, also enable senders to set some basic mail contents more conveniently, dynamically obtain variable values, and facilitate changing at any time, and simultaneously support setting mail triggering rules, control mail tasks to be executed at a certain time by using timing tasks, improve code multiplexing rate, and improve work efficiency. And finally, after the data are packaged, sending a request to a mail server by using a public method, and completing mail sending.
Fig. 1 is a flow chart of a mail processing method provided in this embodiment, as shown in fig. 1, the method includes:
step 101, receiving a first mail sending request, and analyzing the service type, the mail content and the sending requirement of a mail to be sent from the first mail sending request;
the first mail sending request is a mail sending request input through a client;
Optionally, the user inputs the first mail sending request at the client to configure the mail to be sent, where the input mode of the first mail sending request may be that the user directly fills the mail at the client through a voice or text mode, or the user selects the mail by using a drop-down option preset in the client, which is not limited in this embodiment specifically.
After receiving a first mail sending request input by a client, analyzing the first mail sending request to obtain the service type, the mail content and the sending requirement of the mail to be sent.
The service types of the mail to be sent can be divided into notification types and reminding types, and can be further divided into the types of workload function point review filing notification, technical review filing notification, review entry defect notification, initiating comment signature notification, project information adjustment list filing notification, production task closing notification, production task scheduling filing notification, project week report issuing notification, week report non-issuing reminding, production task list about closing reminding, production task formal version submitting reminding, project week report week four reminding, project week report non-issuing daily reminding and the like.
The mail content of the mail to be sent may be a combination of one or more of the contents including a mail ID, a mail name, a mail description, a mail subject, a recipient, a transcriber, a mail body, and the like, and the fields of each content in the mail content may include one or more parameter items, which is not specifically limited in this embodiment.
The sending requirement of the mail to be sent may be a special requirement of the user, which is input by the client and is other than the limited mail service type and content, and exemplary sending requirement of the mail to be sent may be sending the mail at regular time, checking the content of a part of the mail, or judging the preset condition of the mail, which is not limited in this embodiment.
Step 102, acquiring a mail template corresponding to the service type, and configuring the mail content into the mail template to obtain the mail to be sent;
the mapping relation is preconfigured between the service type and the mail template corresponding to the service type, and the mapping relation can be the mapping relation directly existing between the function or name of the service type and the mail template; the mapping relationship may also be constructed by setting an identifier for the service type and corresponding it to the mail template one by one, which is not specifically limited in this embodiment.
Alternatively, when the mail content is configured into the mail template, the parameter values required to be configured for the mail template may be parsed from the mail content, and then the filling positions of the parameter values are configured according to the data structure of the mail template, so as to configure the mail content into the mail template.
Step 103, calling a target processing component corresponding to the sending requirement, executing mail processing logic in the target processing component on the mail to be sent, and sending the mail to be sent according to a processing result.
Optionally, the target processing component is a processing component for providing mail processing logic for the mail to be sent according to the mail sending requirement, and the processing component may be one component or a combination of multiple components preset according to the actual scene. The target processing component may be, for example, a combination including one or more of a channel state determination component, a timing transmission component, a content verification component, and other preset condition determination components, which is not specifically limited in this embodiment.
Accordingly, if the target processing component is a single component, the mail processing logic of the mail to be sent may be to directly execute the target processing component; if the target processing component is a combination of multiple components, the mail processing logic of the mail to be sent may be processing logic formed by orderly combining sub-components in the target processing component according to an actual application scenario.
By way of example, taking the example that the target processing component includes a channel state judging component, a timing sending component and a content checking component, the mail processing logic of the mail to be sent may be to run the channel state judging component, the timing sending component and the content checking component one by one; the channel state judgment component, the timing transmission component, and the content verification component may also be executed in reverse order, which is not specifically limited in this embodiment.
After the execution of the mail processing logic of the mail to be sent is completed, the corresponding processing result is obtained and the mail to be sent is sent according to the processing result.
Alternatively, the mail to be sent may be sent directly to the receiving client through the local server, or may be sent through a request sent by a third party server, which is not specifically limited in this embodiment.
In the embodiment, a service type, mail content and transmission requirements of a mail to be transmitted are obtained by firstly analyzing a first mail transmission request input from a client; then, acquiring a corresponding mail template according to the service type and configuring mail content in the mail template to obtain a mail to be sent; and finally, executing mail processing logic in the target processing component to the mail to be sent to obtain a processing result, and completing the sending of the mail to be sent according to the processing result, thereby realizing the configuration processing of mail contents, flexibly sending the mail according to service requirements by writing a small amount of necessary codes, greatly improving the processing efficiency, reducing redundant work and saving manpower and material resources.
On the basis of the foregoing embodiment, in this embodiment, sending the mail to be sent according to the processing result includes: when the processing result is that the mail to be sent meets the mail sending condition, calling a mail sending function, and processing the mail to be sent to obtain a second mail sending request; transmitting the second mail sending request to a target server, so that the target server sends the mail to be sent according to the second mail sending request; wherein the processing includes data loading, data encryption and data encapsulation; the mail sending condition comprises that the sending time reaches the preset sending time and/or the state of the sending channel is an open state.
Firstly, analyzing a processing result, acquiring a judging result about whether a state of a sending channel of a mail to be sent is an open state, if a preset sending time exists in a sending requirement of the mail to be sent currently, acquiring a judging result about whether the sending time of the mail to be sent reaches the preset sending time, and when the sending time of the mail to be sent reaches the preset sending time and the state of the sending channel of the mail to be sent is the open state, calling a mail sending function when the mail to be sent meets mail sending conditions; if the current sending requirement of the mail to be sent does not contain the preset sending time, the judgment result of whether the sending time of the mail to be sent reaches the preset sending time is not needed to be obtained, and when the state of the sending channel of the mail to be sent is in an open state, the mail to be sent can be determined to meet the mail sending condition so as to call a mail sending function.
And then, carrying out one or more processing treatments including data loading, data encryption and data encapsulation on the mail to be sent according to the actual scene through a mail sending function, and generating a corresponding second mail sending request.
The data loading may be configuring and loading the data of the mail to be sent.
The data encryption may encrypt the mail to be sent by constructing a key, and the data encapsulation may encapsulate the processed mail information.
For example, the data encryption may be by constructing Token (computer identity authentication Token) to encrypt the mail to be sent, and the data encapsulation may be by encapsulating the processed mail message using HttpClient (Hyper Text Transfer Protocol Client, hypertext transfer protocol programming kit) and configuring the network address URL (Uniform Resource Locator ).
Token is a string of characters generated by the server and used as a request Token for the client, when the server logs in for the first time, the Token is generated by the server and returned to the client, and the client only needs to carry the Token to request data before carrying the Token, and does not need to carry the user name and the password again
Httpcalient is a client programming toolkit that can be used to provide efficient, up-to-date, function-rich support for HTTP (Hyper Text Transfer Protocol ), and it supports up-to-date versions and suggestions of the HTTP protocol.
And finally, transmitting the second mail sending request to the target server by using a mail sending function, and sending the mail to be sent.
The second mail sending request is a mail sending request which is input to the target server locally and used for sending a mail to be sent; the target server may be a third party mail server for mail delivery.
The mail sending function combines the information such as the data, the network address, the data encryption key and the like which are originally set, assembles the mail information and sends a request to the mail server, and after the server responds to the request, the system can judge whether the mail is sent successfully or failed according to the acquired response information and feeds back the related information.
The mail sending function may be specifically executed by the codes shown in tables 1 and 2:
TABLE 1 one of the mailing function code tables
Figure BDA0004103798600000101
Figure BDA0004103798600000111
TABLE 2 mail transfer function code table two
Figure BDA0004103798600000112
Figure BDA0004103798600000121
Judging a processing result, and calling a mail sending function to carry out processing treatments such as data loading, data encryption, data encapsulation and the like on the mail to be sent under the condition that the mail to be sent meets the mail sending condition, so as to obtain a second mail sending request; and then transmitting the second mail sending request to the target server, and finally completing the sending of the mail to be sent by the target server, thereby realizing the dynamic management of mail data, improving the safety and efficiency of mail sending and reducing code redundancy.
On the basis of the above embodiment, the target processing component in this embodiment includes one or more combinations of a first processing component, a second processing component, and a third processing component; the first processing component is used for judging the state of the sending channel of the mail to be sent; the second processing component is used for judging the sending time of the mail to be sent; and the third processing component is used for judging the checking state of the mail to be sent.
Alternatively, when executing the processing logic of the target processing component for the mail to be sent, the execution sequence of the first processing component, the second processing component and the third processing component in the target processing component may be preset in advance, or the execution sequence of the three may be set arbitrarily according to the actual scenario, which is not limited specifically in this embodiment.
The first processing component is used for judging whether the state of the sending channel of the mail to be sent is an open state or not, and a first processing result is obtained after the judgment is completed, wherein the first processing result can be used as a basis for judging the sending condition of the subsequent mail.
For the mail to be sent with preset sending time in the sending requirement, a time setting timing task for sending the mail can be set according to the service requirement, and the sending task is called at the specified time. And judging whether the sending time of the mail to be sent is the preset sending time or not by using the second processing component, and obtaining a second processing result after the judgment is completed, wherein the second processing result can also be used as the basis for judging the sending condition of the subsequent mail.
Similarly, for the mail to be sent, the check state in the sending requirement is judged to be needed, a third processing component is used for judging whether the content of the mail to be sent has the state to be checked, and a third processing result is obtained after the judgment is completed; the first processing result, the second processing result and the third processing result together form a final processing result.
According to the embodiment, the first processing component for judging the state of the sending channel of the mail to be sent, the second processing component for judging the sending time of the mail to be sent and the third processing component for judging the checking state of the mail to be sent are set in the target processing component, so that flexible logic processing of the mail to be sent according to business needs is realized, a final processing result is obtained, and the flexibility of mail processing is improved.
On the basis of the above embodiment, fig. 2 is a schematic flow chart of the mail processing logic for executing the mail to be sent according to the present embodiment.
As shown in fig. 2, the calling the target processing component corresponding to the sending requirement, executing the mail processing logic in the target processing component on the mail to be sent, includes:
step 201, calling the first processing component to judge the state of the sending channel of the mail to be sent;
For example, determining whether the sending channel of the mail to be sent is in an open state may be determined according to whether the status identifier of the sending channel is 0, or whether the problem status of the mail to be sent is empty, or may be specifically performed by the code shown in table 3:
table 3 first processing element code table
Figure BDA0004103798600000141
Step 202, calling the second processing component to judge the sending time of the mail to be sent under the condition that the state of the sending channel is determined to be an open state;
for example, taking eight points per four weeks of the preset sending time of the timing task as an example, for a mail to be sent having the preset sending time in the sending requirement, determining whether the sending time of the mail to be sent is the preset sending time may be specifically performed by using codes shown in table 4:
table 4 second processing element code table
Figure BDA0004103798600000151
Step 203, checking the mail content of the mail to be sent under the condition that the sending time of the mail to be sent meets the preset sending time;
step 204, adding the mail receiving object of the mail to be sent in the mail sending object column of the mail to be sent under the condition that the field of the state to be checked exists in the mail to be sent.
When the mail to be sent is sent to a preset receiver, the mail to be sent is synchronously sent to a writer of the mail to be sent so as to confirm the field of the state to be checked.
For example, for the mail to be sent for which the verification state determination is required in the sending requirement, determining whether the verification state exists in the content of the mail to be sent and processing may specifically be performed by the code shown in table 5:
table 5 third processing element code table
Figure BDA0004103798600000161
According to the embodiment, the mail processing logic in the mail processing target processing component is specifically limited, so that the trigger rule is flexibly set for the mail to be sent according to the service requirement, the final processing result is obtained, and the mail processing efficiency is improved.
On the basis of the foregoing embodiment, in this embodiment, configuring the mail content to the mail template to obtain the mail to be sent includes: matching each field in the mail content with each target field in the mail template; determining the configuration position of the parameter value of each field in the mail template according to the position of the parameter to be configured of the target field matched with each field; and configuring the parameter values of the fields into the mail template according to the configuration positions to obtain the mail to be sent.
The mail template corresponding to the service type may be a combination of one or more of contents including a mail ID, a mail name, a mail description, a mail subject, a recipient, a transcriber, a mail body, and the like, and the target fields of each content in the mail template may each include one or more preset parameters to be configured, which is not limited in this embodiment specifically.
After a mail template corresponding to the service type of the mail to be sent is obtained, firstly, each field in the analyzed mail content is matched with each target field in the mail template one by one, a matching result is obtained, and the matching result is analyzed to obtain target fields matched with each field in the mail content respectively.
And then, in the target fields of each mail template matched with each field in the mail content, acquiring parameters to be configured one by one, carrying out one-to-one matching on the parameters and each parameter item in the corresponding field of the mail content, acquiring a matching result, analyzing the matching result to acquire parameters to be configured matched with each parameter item in each field of the mail content, and then respectively acquiring the positions of the parameters to be configured in the target fields of the mail templates.
The position of the parameters to be configured in the target field of the mail template can be used as the configuration position of the parameter values in the corresponding mail content fields in the mail template, and the parameter values of the fields in the mail content are configured in the mail template according to the configuration position, so that the final mail to be sent is obtained.
The embodiment matches each field in the mail content with each target field in the mail template firstly; then, finding out parameters to be configured and positions thereof matched with parameter items of mail content in target fields matched with the fields; and configuring the parameter values of each field according to the obtained parameter position to be configured, and finally obtaining the mail to be sent, so as to realize the combination of service requirements, the template and the mail content configuration, facilitate the multiplexing of the mail templates and reduce redundant work.
On the basis of the foregoing embodiment, the acquiring the mail template corresponding to the service type in this embodiment includes: searching the mail template in a database according to the function identifier and/or the name identifier corresponding to the service type; the database comprises mapping relations between each service type and each mail template, which are constructed in advance according to function identifiers and/or name identifiers corresponding to each service type.
Optionally, the implementation manner of searching the mail template in the database may be that indexes formed by all function identifiers and/or name identifiers corresponding to the mail template in the database are integrally matched with indexes formed by all function identifiers and/or name identifiers corresponding to the service type of the mail to be sent, so as to determine the mail template matched with the service type of the mail to be sent in the database; or, a single function identifier or name identifier corresponding to the mail template in the database is directly matched with each function identifier or name identifier corresponding to the service type of the mail to be sent, so as to determine the mail template in the database matched with the service type of the mail to be sent, which is not limited in detail in this embodiment.
As shown in table 6, the mail content table is a mail content table of various mail templates, wherein mail ID is a code corresponding to the mail, and parameters are contents in the mail which need to be configured by operators; the specific definition of the parameters to be configured comprises: proj_name is the project name, apply_man is the applicant, stand holder is the project main system, jodges is the commender, url is the concrete link of notification, jodges_part is the department of the commender, proj_man is the department to which the project belongs, pmo is the project manager, task_name is the task list name, task_num is the number of tasks in the task list, and proj_num is the number of the project.
Table 6 mail content table of mail template
Figure BDA0004103798600000181
/>
Figure BDA0004103798600000191
/>
Figure BDA0004103798600000201
Figure BDA0004103798600000211
/>
The database is updated in real time according to the change of the service type and the mail template by an operator, and the database can update and store the service type and the mail template in real time according to the mapping relationship between the service type and the mail template constructed according to the function identifier and/or the name identifier corresponding to each service type.
According to the embodiment, the mail templates corresponding to the mails to be sent are obtained according to the function identifiers and/or the name identifiers corresponding to the service types through the mapping relation between the service types and the mail templates configured in the database, so that the subsequent configuration of mail contents is facilitated, efficient multiplexing of the mail templates is realized, and redundant work is reduced.
The mail processing apparatus provided by the present invention will be described below, and the mail processing apparatus described below and the mail processing method described above may be referred to in correspondence with each other.
As shown in fig. 3, a schematic structural diagram of a mail processing device provided by the present invention includes a receiving module 301, a configuration module 302, and a processing module 303.
A receiving module 301, configured to receive a first mail sending request, and parse a service type, a mail content, and a sending requirement of a mail to be sent from the first mail sending request; the first mail sending request is a mail sending request input through a client;
The configuration module 302 is configured to obtain a mail template corresponding to the service type, and configure the mail content to the mail template to obtain the mail to be sent;
and the processing module 303 is configured to invoke a target processing component corresponding to the sending requirement, execute mail processing logic in the target processing component on the mail to be sent, and send the mail to be sent according to a processing result.
The mail processing device provided by the embodiment obtains the service type, the mail content and the sending requirement of the mail to be sent by firstly analyzing the first mail sending request input from the client; then, acquiring a corresponding mail template according to the service type and configuring mail content in the mail template to obtain a mail to be sent; and finally, executing mail processing logic in the target processing component to the mail to be sent to obtain a processing result, and completing the sending of the mail to be sent according to the processing result, thereby realizing the configuration processing of mail contents, flexibly sending the mail according to service requirements by writing a small amount of necessary codes, greatly improving the processing efficiency, reducing redundant work and saving manpower and material resources.
On the basis of the above embodiment, the processing module 303 in this embodiment is specifically further configured to: when the processing result is that the mail to be sent meets the mail sending condition, calling a mail sending function, and processing the mail to be sent to obtain a second mail sending request; transmitting the second mail sending request to a target server, so that the target server sends the mail to be sent according to the second mail sending request; wherein the processing includes data loading, data encryption and data encapsulation; the mail sending condition comprises that the sending time reaches the preset sending time and/or the state of the sending channel is an open state.
On the basis of the above embodiment, the processing module 303 in this embodiment specifically further includes: the target processing assembly comprises one or more combinations of a first processing assembly, a second processing assembly and a third processing assembly; the first processing component is used for judging the state of the sending channel of the mail to be sent; the second processing component is used for judging the sending time of the mail to be sent; and the third processing component is used for judging the checking state of the mail to be sent.
On the basis of the above embodiment, the processing module 303 in this embodiment is specifically further configured to: invoking the first processing component to judge the state of the sending channel of the mail to be sent; under the condition that the state of the sending channel is determined to be an open state, the second processing component is called, and the sending time of the mail to be sent is judged; under the condition that the sending time of the mail to be sent meets the preset sending time, checking the mail content of the mail to be sent; and under the condition that the field of the state to be checked exists in the mail to be sent, adding a mail receiving object of the mail to be sent in a mail sending object column of the mail to be sent.
On the basis of the above embodiment, the configuration module 302 in this embodiment is specifically further configured to: matching each field in the mail content with each target field in the mail template; determining the configuration position of the parameter value of each field in the mail template according to the position of the parameter to be configured of the target field matched with each field; and configuring the parameter values of the fields into the mail template according to the configuration positions to obtain the mail to be sent.
On the basis of the above embodiment, the configuration module 302 in this embodiment is specifically further configured to: searching the mail template in a database according to the function identifier and/or the name identifier corresponding to the service type; the database comprises mapping relations between each service type and each mail template, which are constructed in advance according to function identifiers and/or name identifiers corresponding to each service type.
Fig. 4 illustrates a physical schematic diagram of an electronic device, as shown in fig. 4, which may include: a processor (processor) 401, a communication interface (Communications Interface) 402, a memory (memory) 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 complete communication with each other through the communication bus 404. The processor 401 may call logic instructions in the memory 403 to perform a mail processing method, the method comprising: receiving a first mail sending request, and analyzing the service type, the mail content and the sending requirement of the mail to be sent from the first mail sending request; the first mail sending request is a mail sending request input through a client; acquiring a mail template corresponding to the service type, and configuring the mail content into the mail template to obtain the mail to be sent; and calling a target processing component corresponding to the sending requirement, executing mail processing logic in the target processing component on the mail to be sent, and sending the mail to be sent according to a processing result.
Further, the logic instructions in the memory 403 may be implemented in the form of software functional units and stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of executing the mail processing method provided by the above methods, the method comprising: receiving a first mail sending request, and analyzing the service type, the mail content and the sending requirement of the mail to be sent from the first mail sending request; the first mail sending request is a mail sending request input through a client; acquiring a mail template corresponding to the service type, and configuring the mail content into the mail template to obtain the mail to be sent; and calling a target processing component corresponding to the sending requirement, executing mail processing logic in the target processing component on the mail to be sent, and sending the mail to be sent according to a processing result.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the mail processing method provided by the above methods, the method comprising: receiving a first mail sending request, and analyzing the service type, the mail content and the sending requirement of the mail to be sent from the first mail sending request; the first mail sending request is a mail sending request input through a client; acquiring a mail template corresponding to the service type, and configuring the mail content into the mail template to obtain the mail to be sent; and calling a target processing component corresponding to the sending requirement, executing mail processing logic in the target processing component on the mail to be sent, and sending the mail to be sent according to a processing result.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A mail processing method, characterized by comprising:
receiving a first mail sending request, and analyzing the service type, the mail content and the sending requirement of the mail to be sent from the first mail sending request; the first mail sending request is a mail sending request input through a client;
acquiring a mail template corresponding to the service type, and configuring the mail content into the mail template to obtain the mail to be sent;
and calling a target processing component corresponding to the sending requirement, executing mail processing logic in the target processing component on the mail to be sent, and sending the mail to be sent according to a processing result.
2. The mail processing method according to claim 1, wherein the sending the mail to be sent according to the processing result includes:
when the processing result is that the mail to be sent meets the mail sending condition, calling a mail sending function, and processing the mail to be sent to obtain a second mail sending request;
transmitting the second mail sending request to a target server, so that the target server sends the mail to be sent according to the second mail sending request;
Wherein the processing includes data loading, data encryption and data encapsulation;
the mail sending condition comprises that the sending time reaches the preset sending time and/or the state of the sending channel is an open state.
3. The mail processing method of claim 1, wherein the target processing component comprises one or more combinations of a first processing component, a second processing component, and a third processing component;
the first processing component is used for judging the state of the sending channel of the mail to be sent;
the second processing component is used for judging the sending time of the mail to be sent;
and the third processing component is used for judging the checking state of the mail to be sent.
4. The mail processing method according to claim 3, wherein said calling a target processing component corresponding to the transmission requirement, executing mail processing logic in the target processing component on the mail to be transmitted, includes:
invoking the first processing component to judge the state of the sending channel of the mail to be sent;
under the condition that the state of the sending channel is determined to be an open state, the second processing component is called, and the sending time of the mail to be sent is judged;
Under the condition that the sending time of the mail to be sent meets the preset sending time, checking the mail content of the mail to be sent;
and under the condition that the field of the state to be checked exists in the mail to be sent, adding a mail receiving object of the mail to be sent in a mail sending object column of the mail to be sent.
5. The mail processing method according to any one of claims 1 to 4, wherein said configuring the mail content into the mail template to obtain the mail to be sent includes:
matching each field in the mail content with each target field in the mail template;
determining the configuration position of the parameter value of each field in the mail template according to the position of the parameter to be configured of the target field matched with each field;
and configuring the parameter values of the fields into the mail template according to the configuration positions to obtain the mail to be sent.
6. The mail processing method according to any one of claims 1 to 4, wherein the obtaining a mail template corresponding to the service type includes:
searching the mail template in a database according to the function identifier and/or the name identifier corresponding to the service type;
The database comprises mapping relations between each service type and each mail template, which are constructed in advance according to function identifiers and/or name identifiers corresponding to each service type.
7. A mail processing apparatus, characterized by comprising:
the receiving module is used for receiving a first mail sending request, and analyzing the service type, the mail content and the sending requirement of the mail to be sent from the first mail sending request; the first mail sending request is a mail sending request input through a client;
the configuration module is used for acquiring a mail template corresponding to the service type, and configuring the mail content into the mail template to obtain the mail to be sent;
and the processing module is used for calling a target processing component corresponding to the sending requirement, executing mail processing logic in the target processing component on the mail to be sent, and sending the mail to be sent according to a processing result.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the mail processing method of any one of claims 1 to 6 when the program is executed by the processor.
9. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the mail processing method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program which, when executed by a processor, implements a mail processing method as claimed in any one of claims 1 to 6.
CN202310185379.7A 2023-02-28 2023-02-28 Mail processing method, mail processing device, electronic equipment and storage medium Pending CN116308236A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310185379.7A CN116308236A (en) 2023-02-28 2023-02-28 Mail processing method, mail processing device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310185379.7A CN116308236A (en) 2023-02-28 2023-02-28 Mail processing method, mail processing device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116308236A true CN116308236A (en) 2023-06-23

Family

ID=86817946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310185379.7A Pending CN116308236A (en) 2023-02-28 2023-02-28 Mail processing method, mail processing device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116308236A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116545976A (en) * 2023-07-03 2023-08-04 深圳欧税通技术有限公司 Intelligent management method, system and readable storage medium for business mail

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116545976A (en) * 2023-07-03 2023-08-04 深圳欧税通技术有限公司 Intelligent management method, system and readable storage medium for business mail
CN116545976B (en) * 2023-07-03 2024-01-19 深圳欧税通技术有限公司 Intelligent management method, system and readable storage medium for business mail

Similar Documents

Publication Publication Date Title
CN110601952B (en) Multi-channel message notification sending method and device
CN106101258B (en) Interface calling method, device and system of hybrid cloud
CN110515965B (en) Business document processing method and device, computer equipment and storage medium
US11455362B2 (en) System and method for sharing information using a machine-readable code on a mobile device
US9442925B2 (en) Regulated texting solution for mobile devices
US20110047385A1 (en) Methods and Systems for Digitally Signing a Document
CN108055238A (en) A kind of account verification method and system
CN112615753A (en) Link abnormity tracking method, first node, second node and link
CN116308236A (en) Mail processing method, mail processing device, electronic equipment and storage medium
CN108305073B (en) Method and system for executing transaction requests using a communication channel
CN113794999B (en) Short message distribution method, device and storage medium
CN106559386A (en) A kind of authentication method and device
US7707222B2 (en) Method and apparatus for providing access to information systems via e-mail
US20200396248A1 (en) Executing Real-Time Message Monitoring to Identify Potentially Malicious Messages and Generate Instream Alerts
CN110673970A (en) Cross-process calling system and method based on web application
US9578500B1 (en) Authentication via mobile telephone
CN114095365B (en) Processing method and device of Internet of things service based on 5G message
CN112632497B (en) Identity information verification method and system based on blockchain
CN107566422A (en) A kind of verification method of third party user
CN111049877B (en) Big data external output method and device and data open platform
US10623523B2 (en) Distributed communication and task handling to facilitate operations of application system
CN110072200B (en) Short message sending control processing method and device and computer equipment
CN110647757A (en) Data processing method based on intelligent contract and related device
US11743218B2 (en) Message capture in a multi channel communication environment
CN115426142A (en) Method and device for calling encrypted data service interface and computer equipment

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