CN109104360B - Mail sending method, mail sending system, computer equipment and storage medium - Google Patents

Mail sending method, mail sending system, computer equipment and storage medium Download PDF

Info

Publication number
CN109104360B
CN109104360B CN201811093263.6A CN201811093263A CN109104360B CN 109104360 B CN109104360 B CN 109104360B CN 201811093263 A CN201811093263 A CN 201811093263A CN 109104360 B CN109104360 B CN 109104360B
Authority
CN
China
Prior art keywords
mail
template
user
storage space
client
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.)
Active
Application number
CN201811093263.6A
Other languages
Chinese (zh)
Other versions
CN109104360A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811093263.6A priority Critical patent/CN109104360B/en
Publication of CN109104360A publication Critical patent/CN109104360A/en
Application granted granted Critical
Publication of CN109104360B publication Critical patent/CN109104360B/en
Active 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

Landscapes

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

Abstract

The invention discloses a mail sending method, a mail sending system, computer equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps that a mail server receives a mail template configured by a user on a mail management platform, the mail template is stored in a storage space, if a client receives a mail sending request of the user, a template obtaining interface provided by the mail server is used for sending the template obtaining request to the mail server, the mail server sends the mail template to the client, the client generates a mail to be sent according to the mail template selected by the user and the mail content contained in the mail sending request, and then the mail sending interface provided by the mail server is called to send the mail to be sent. The embodiment of the invention provides a unified mail server, realizes the service mail sending function of the client, does not need to independently develop the mail function of the client in each client, saves the labor cost and improves the development efficiency of the mail function of the client.

Description

Mail sending method, mail sending system, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and a system for sending a mail, a computer device, and a storage medium.
Background
In application projects related to the internet, service mails often need to be pushed according to own service characteristics, with the increasing abundance and variety of application projects in the network, a mail sending function has become a common function of each application project, and the service mails of each application project have respective service characteristics and different service functions and need to be sent.
At present, most application projects are provided with a set of mail system for pushing and managing mails customized for self service functions, the mails in each application project have strong customization but also have high similarity, the repeated development of service mails with similar functions needs to consume a large amount of human resources, and meanwhile, when the information of the service mails changes, developers need to maintain logic codes of the mail system and modify the current mail template information, so that the maintenance efficiency of the mail system is not high.
Disclosure of Invention
The embodiment of the invention provides a mail sending method, a mail sending system, computer equipment and a storage medium, which are used for solving the problem of low development and maintenance efficiency of mail functions of application projects.
A method for sending a mail, comprising:
the mail server receives user information input by a user on a mail management platform, creates a storage space and a storage space identifier of the storage space for the user according to the user information, and correspondingly stores the user information and the storage space identifier to a preset user database;
the mail server receives a mail template configured by the user on the mail management platform and stores the mail template in the storage space;
if the client receives the mail sending request of the user, inquiring the storage space identification of the user in the preset user database according to the user information logged in by the user at the client;
the client sends a template acquisition request to the mail server by using a template acquisition interface provided by the mail server according to the storage space identifier;
the mail server side acquires a mail template in the storage space corresponding to the storage space identification according to the template acquisition request, and sends the mail template to the client side so as to enable the user to select;
the client takes the mail template selected by the user as a target template;
the client fills the mail content contained in the mail sending request into the target template to generate a mail to be sent;
and the client calls a mail sending interface provided by the mail server and sends the mail to be sent through the mail server.
A mail transmission system comprising: the system comprises a mail server and a client, wherein the mail server is connected with the client through a network;
the mail server side comprises:
the space creation module is used for receiving user information input by a user on a mail management platform, creating a storage space and a storage space identifier of the storage space for the user according to the user information, and correspondingly storing the user information and the storage space identifier into a preset user database;
the template configuration module is used for receiving the mail template configured by the user on the mail management platform and storing the mail template in the storage space;
the template sending module is used for obtaining a mail template in the storage space corresponding to the storage space identifier according to the template obtaining request and sending the mail template to the client so as to enable the user to select the mail template;
the client side comprises:
the identification query module is used for querying the storage space identification of the user in the preset user database according to the user information logged in by the user at the client if the mail sending request of the user is received;
the request sending module is used for sending a template obtaining request to the mail server by using a template obtaining interface provided by the mail server according to the storage space identifier;
the template selection module is used for taking the mail template selected by the user as a target template;
the mail generation module is used for filling the mail content contained in the mail sending request into the target template to generate a mail to be sent;
and the mail sending module is used for calling a mail sending interface provided by the mail server and sending the mail to be sent through the mail server.
A computer device includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the steps executed by the mail server or the client in the above mail sending method when executing the computer program.
A computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps executed by the mail server or the client in the above-mentioned mail sending method.
According to the mail sending method, the mail sending system, the computer equipment and the storage medium, the mail template is configured in the mail server in advance according to the service content of each application project in the client, if the client receives a mail sending request of a user, the client can call the corresponding mail template only through the template acquisition interface provided by the unified mail server, the mail content to be sent is filled in the mail template to generate a mail to be sent, and then the mail sending interface provided by the mail server is called to send the mail to be sent, so that the service mail sending function of the application project in the client is realized, the mail function of the application project in each client does not need to be developed independently, the labor cost is saved, the development efficiency of the mail function of the client is improved, and when the format or the content of the service mail needs to be adjusted, the mail template can be modified in the mail management platform of the mail server, so that the user can flexibly customize the mail template of the application project in the client, the maintenance of the service mail of the corresponding application project is realized, and the maintenance efficiency of the mail function of the client is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention 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 that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic diagram of an application environment of a method for sending an email according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of sending mail in one embodiment of the present invention;
FIG. 3 is a detailed flowchart of step S20 in FIG. 2;
FIG. 4 is a detailed flowchart of step S50 in FIG. 2;
FIG. 5 is a flowchart illustrating a method for sending a recommendation template by a mail server in a method for sending a mail according to an embodiment of the present invention;
FIG. 6 is a detailed flowchart of step S80 in FIG. 2;
FIG. 7 is a functional block diagram of a mail delivery system in accordance with an embodiment of the present invention;
FIG. 8 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
The mail sending method provided by the application can be applied to an application environment as shown in fig. 1, the application environment comprises a mail server and a client, the mail server and the client are connected through a network, the client sends a template obtaining request to the server by using a template obtaining interface provided by the mail server according to a mail sending request of a user, the mail server feeds a mail template back to the client according to the template obtaining request, the client generates a mail to be sent according to the mail template selected by the user, and the mail sending interface provided by the mail server is called to send the mail to be sent. The client may specifically but not limited to various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the mail server may specifically be implemented by an independent server or a server cluster composed of multiple servers. The mail sending method provided by the embodiment of the invention depends on the cooperative completion of the mail server and the client.
In an embodiment, fig. 2 shows a flowchart of a method for sending a mail in this embodiment, as shown in fig. 2, the method for sending a mail includes steps S10 to S80, which are detailed as follows:
s10: the mail server receives user information input by a user on the mail management platform, creates a storage space and a storage space identifier of the storage space for the user according to the user information, and correspondingly stores the user information and the storage space identifier into a preset user database.
In this embodiment, the mail server is a device for managing sending and receiving of mails, the mail server may be specifically implemented by an independent server or a server cluster formed by multiple servers, the mail management platform is a user management interface provided by the mail server and used for managing configuration of a mail template, the user management interface may be specifically a web interface, a user can enter the mail management platform by inputting an IP address corresponding to the user management interface, so that the user can perform operations such as configuration or management of the mail template on the mail management platform, and the preset user database is a database used by the mail server for storing user information.
Specifically, the mail server receives user information input by a user on the mail management platform, wherein the user information includes but is not limited to a user name, a user password, a user department, a user mailbox and the like, and creates a corresponding storage space and a storage space identifier of the storage space for the user in the mail server according to the user information, and correspondingly stores the user information and the storage space identifier into a preset user database, wherein the storage space identifier is identification information of the storage space and can uniquely identify the storage space of the user.
S20: and the mail server receives a mail template configured by a user on the mail management platform and stores the mail template in a storage space.
Specifically, a user logs in a mail management platform by using a user name and a user password, and configures a mail template in the mail management platform, where the mail template may be a common text mail template, a web page email template, or a self-defined mail template, and the specific mail template user may configure according to the requirements of actual services, which is not limited herein.
After a user configures a mail template to be customized on a mail management platform, the mail management platform uploads the configured mail template to a mail server, and the mail server acquires a storage space identifier of the user according to user information and stores the configured mail template into a storage space corresponding to the storage space identifier.
S30: and if the client receives a mail sending request of the user, inquiring the storage space identification of the user in a preset user database according to the user information logged in by the user at the client.
Specifically, the client may specifically be but not limited to various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, where the client includes one or more application items, the application items are software items running on the client, and when a user uses an application item in the client, if a function of sending a mail is required according to a current business process, the user performs an operation of sending the mail based on mail content to be sent, submits a mail sending request to the client, and the client detects user information filled by the user when logging in the client, and queries a storage space identifier corresponding to the user information in a preset user database according to the user information.
S40: and the client sends a template acquisition request to the mail server by using a template acquisition interface provided by the mail server according to the storage space identifier.
Specifically, the template acquisition Interface is an Application Programming Interface (API) Interface provided by the mail server, the template acquisition Interface is an Interface provided by the mail server for calling the mail template for the client, and the client generates a template acquisition request according to a calling rule of the template acquisition Interface provided by the mail server to call the mail template, so that data information stored in the mail server can be used in an Application project of the client.
Further, the client needs to write the storage space identifier into the template obtaining request, and requests the mail server to obtain the mail template through a template obtaining interface provided by the mail server using the template obtaining request, and a calling rule of the template obtaining interface may be specifically set according to a requirement of an actual application, for example, a format of the template obtaining request may be: https:// api. Example. Com/template/get/bucket, wherein "api. Example. Com" is an exclusive domain name of a mailbox server, parameter template is directory information of files storing all storage spaces, parameter bucket is a storage space identifier, and a mail server side is used for parameter
And the bucket performs URL (Uniform Resource Locator) encoding processing to obtain a specific storage path of the file of the storage space corresponding to the storage space identifier in the mail server, so that a get command is used for obtaining the mail template in the storage space in the mail server.
S50: and the mail server side acquires a mail template in the storage space corresponding to the storage space identifier according to the template acquisition request and sends the mail template to the client side so as to enable the user to select.
Specifically, the mail server analyzes the template acquisition request to obtain a specific storage path of a file of a storage space corresponding to the storage space identifier in the mail server, acquires the mail template in the storage space corresponding to the storage space identifier, packages the acquired mail template into a text file in a key value pair form, and sends the text file to the client through an HTTP (HyperText Transfer Protocol) Protocol.
The text file in the key-value pair form is a lightweight data exchange format, and is an effective carrier for data exchange between different systems, and the text file in the key-value pair form includes, but is not limited to, a JSON (JavaScript Object Notation) file, an XML (extensible Markup Language) file, and the like.
It should be noted that the JSON file is not dependent on an operating system, and can be generated and analyzed conveniently, so that the network transmission efficiency is effectively improved, and the JSON file can be used as an optimal JSON file.
The client analyzes the text file in the form of the key value pair sent by the mail server to obtain a mail template, and the mail template is output to an interactive interface of the client so as to enable a user to select.
S60: the client takes the mail template selected by the user as a target template.
Specifically, the client lists the name of the mail template in the interactive interface, if the user needs to further know the specific content of the mail template, the specific content of the mail template can be checked by double-clicking the name of the mail template, the user selects according to the mail template displayed in the interactive interface of the client, the selected mail template is submitted to the client, the client takes the mail template selected by the user as a target template, for example, the selection of the mail template can be realized by clicking the name of the selected mail template and clicking a determination button, but not limited thereto, and the specific selection mode of the mail template can be set according to actual needs.
S70: and the client fills the mail content contained in the mail sending request into the target template to generate the mail to be sent.
Specifically, the client performs mail content filling processing according to a configured format in the target template, adds service data corresponding to the mail content included in the mail sending request to a corresponding position of the target template, and dynamically renders the target template to generate the mail to be sent.
Further, the specific steps of dynamically rendering the target template include:
according to the user information logged in the current client, acquiring a mailbox address of a user mailbox corresponding to the user information from a preset user database as a sender, or taking a mailbox address of a preset public mailbox as the sender, wherein the preset public mailbox is a mailbox of an application item preset in the client for the service mail receiving and sending service.
Determining a processing person of a next process node of a current business mail according to a preset business processing flow, and acquiring a mailbox address of the processing person as a receiver in a preset address book, wherein the preset business processing flow is a set of business processing flows which are correspondingly set by application items in a client according to business processing contents of the application items, the business processing flow comprises all process nodes of each business and the processing person of each process node, and the preset address book is the mailbox address used for communication of a company worker and a client.
And filling the business data corresponding to the mail content contained in the mail sending request into the text of the target template to generate the mail to be sent.
It can be understood that, a user only needs to configure the mail template at the mail server, and the user can obtain the corresponding mail template at the client according to the service requirement to generate different service mails, thereby realizing the multiplexing of the mail template at different application items and reducing the workload of developers.
S80: and the client calls a mail sending interface provided by the mail server and sends the mail to be sent through the mail server.
Specifically, the Mail sending interface is another API interface provided by the Mail server, the Mail interface is a calling interface for the Mail server to provide a Mail for the client, the client calls the Mail sending interface, and the Mail sending function in the Mail server can be used in an application project of the client, and the Mail server can specifically send a Mail to be sent through a secure transmission Protocol such as SMTP (Simple Mail Transfer Protocol), POP (Post Office Protocol), or IMAP (Internet Message Access Protocol).
In this embodiment, a mail template is configured in a mail server in advance according to service contents of each application item in a client, and if a client receives a mail sending request of a user, each client can call a corresponding mail template only by using a template acquisition interface provided by a unified mail server, fill the mail content to be sent in the mail template to generate a mail to be sent, and then call a mail sending interface provided by the mail server to send the mail to be sent, so that a service mail sending function of the application item in the client is realized.
In an embodiment, the present embodiment provides a detailed description of a specific implementation method that the mail server mentioned in step S20 receives the mail template configured by the user on the mail management platform, and stores the mail template in the storage space.
Referring to fig. 3, fig. 3 shows a specific flowchart of step S20, which is detailed as follows:
s201: and the mail server checks the user information input by the user on the mail management platform according to the user information in the user database to obtain a check result.
Specifically, the mail server checks user information input by a user on a login interface of the mail management platform, the user information is used for performing traversal comparison with all user information in a preset database, if the user information exists in the preset user database, the check result is that the check is passed, the user has the right to log in the mail management platform to configure a mail template, otherwise, if the user information does not exist in the preset user database, the check result is that the check is failed, and prompt information that the user information is wrong is output.
S202: and if the verification result is that the verification is passed, the mail server provides preset template basic configuration information for the user through the mail management platform so that the user configures the mail template according to the preset template basic configuration information.
Specifically, the preset template configuration information is some basic components preset for configuring the mail template, including but not limited to a trademark of a company, a subject of a business mail, a greeting and a mail signature. If the verification result is that the verification is passed, the user has the authority to perform configuration management on the mail template on the mail management platform, for example, a preset mail template can be newly added, modified or deleted, and the like, the mail service system provides preset template basic configuration information to the user through the mail management platform to select the user, so that the user configures the mail template according to the preset template basic configuration information, and the mail template with the fixed format for sending the service mail is obtained.
Further, the mail server side can also confirm the user department of the user according to the user information, so that the basic components suitable for the user of the department can be pushed according to the business attribute of the department where the user is located.
S203: and the mail server receives the mail template configured by the user and stores the mail template in a storage space corresponding to the user information.
Specifically, the mail management platform uploads a mail template configured by a user to a mail server, the mail server receives the mail template configured by the user, stores the mail template in a storage space corresponding to user information, and allocates a corresponding template identification number to each mail template in the storage space, wherein the template identification number can uniquely identify the mail template in the storage space, and the mail templates in different storage spaces can be the same.
In the embodiment, the user information input by the user on the mail management platform is verified through the mail server, the storage safety of the mail template is enhanced, if the verification result is that the verification is passed, the mail server provides the preset template basic configuration information for the user through the mail management platform, so that the user configures the mail template according to the preset template basic configuration information, the configuration efficiency of the mail template is improved, the mail template configured by the user is received finally, and the mail template is stored in the storage space corresponding to the user information, so that the mail template can be flexibly configured according to the service attribute of the application item in the client, the mail template suitable for the application item in the client is obtained, and the mail template can be reused in different clients.
In an embodiment, this embodiment provides a detailed description of a specific implementation method for the mail server mentioned in step S50 to obtain the mail template in the storage space corresponding to the storage space identifier according to the template obtaining request, and send the mail template to the client.
Referring to fig. 4, fig. 4 shows a specific flowchart of step S50, which is detailed as follows:
s501: and the mail server acquires the mail templates in the storage space corresponding to the storage space identification, and counts the requested times of each mail template and the selected times of the selected mail template as the target template in a preset time range.
In this embodiment, the email server receives a template acquisition request sent by a user at a client, and acquires an email template of a storage space corresponding to the user, and the requested times of each email template are correspondingly accumulated once, and meanwhile, after the email server sends all the email templates in the storage space to the client, if the email template is selected as a target template by the user, the selected times of the email template selected as the target template are correspondingly accumulated once.
Specifically, the mail server obtains the mail template in the storage space corresponding to the storage space identifier according to the storage space identifier, and counts the requested times of each mail template and the selected times of the selected mail template as the target template within a preset time range, where the preset time range may be one week or one month, and the specific time range may be preset according to the needs of the actual application, which is not limited herein.
S502: and the mail server calculates the ratio of the selected times to the requested times of each mail template to obtain the historical use frequency of each mail template.
Specifically, the mail server performs ratio operation by using the selected times and the requested times of each mail template, calculates the ratio of the selected times and the requested times of each mail template, and obtains the historical use frequency of each mail template, wherein the historical use frequency is used for describing the used frequency degree of the mail template in a preset time range.
S503: and the mail server sends the mail templates to the client according to the historical use frequency of the mail templates from high to low.
Specifically, the historical use frequency of each mail template is obtained through calculation in step S502, and the mail server sends the mail templates to the client in the order from high to low of the historical use frequency, so that the client can display the mail templates in the interactive interface of the client according to the order of receiving the mail templates, preferentially display the mail templates with higher historical use frequency for the user to select, and improve the efficiency of selecting the mail templates.
In the embodiment, mail templates in a storage space are obtained through a mail server, the requested times of each mail template and the selected times of each selected mail template as a target template in a preset time range are counted, the historical use frequency of each mail template is obtained by calculating the ratio of the selected times to the requested times of each mail template to determine the use frequency degree of the mail templates, and then the mail templates are sent to a client according to the historical use frequency of the mail templates from high to low, so that the client can preferentially display the mail templates with high historical use frequency to provide for a user to select, and the mail template selection efficiency is improved.
In an embodiment, after step S503, that is, after the mail server sends the mail template to the client according to the historical usage frequency of the mail template in the order from high to low in the historical usage frequency, the mail server in the method for sending mail may also send the recommended template in the order, which is detailed as follows:
as shown in fig. 5, after step S503, the mail sending method further includes the steps of:
s5031: and the mail server confirms the user department of the user according to the user information.
Specifically, each department of the company has a service module in special charge, a service mail sent by an application project of a user in a client is related to the department where the user is located, and as the user information of the user comprises the user department, the mail server can confirm the user department of the user according to the user information, so that a mail template with high matching degree with the service mail to be sent can be inquired through the user department.
S5032: and the mail server side inquires mail templates of other users in the same department as the user from a preset user database as associated mail templates according to the user department, and calculates the historical use frequency of each associated mail template.
Specifically, the mail server queries mail templates of other users in the same department as the user from a preset user database according to the user department as associated mail templates, counts the requested times and the selected times of the selected target templates of each associated mail template within a preset time range, and calculates a ratio of the selected times and the requested times of each associated mail template, thereby obtaining a historical use frequency of each associated mail template, wherein the preset time range may be specifically one week or one month, and the specific time range may be preset according to the needs of actual application, which is not limited herein.
S5033: and the mail server side acquires the first N associated mail templates with the highest historical use frequency in the associated mail templates as recommended templates according to the historical use frequency of the associated mail templates, and sends the recommended templates to the client side, wherein N is a positive integer.
Specifically, according to the historical usage frequency of each associated mail template calculated in step S5032, the mail server obtains the top N associated mail templates with the highest historical usage frequency in the associated mail templates as recommended templates, and sends the recommended templates to the client, so as to provide more mail templates for the user to select, so that the user can obtain more excellent mail templates, where N is a positive integer, for example, N may specifically be 3, but is not limited thereto, and the specific value of N may be set according to actual needs, and is not limited herein.
In the embodiment, the mail server side inquires the mail templates of other users in the same department as the user from a preset user database as the associated mail templates according to the user department, calculates the historical use frequency of each associated mail template, and acquires the associated mail template with higher historical use frequency in the associated mail templates as a recommendation template, so that the recommendation template is sent to the client side to provide more mail templates for the user to select, so that the user can acquire more excellent mail templates to apply to the service mails of application items in the client side, and the intelligent level of mail template recommendation and the mail template selection efficiency are improved.
In an embodiment, this embodiment provides a detailed description of a specific implementation method for the client to invoke the mail sending interface provided by the mail server and send the mail to be sent through the mail server in step S80.
Referring to fig. 6, fig. 6 shows a specific flowchart of step S80, which is detailed as follows:
s801: the client adds the mail to be sent to a mail cache pool with preset mail sending time and mail sending mode.
Specifically, the mail cache pools are storage spaces preset by the client for storing mails to be sent, and each mail cache pool is provided with corresponding mail sending time and a mail sending mode.
The sending time of the mail may be instant sending or timing sending, for example, the sending time may be set to send a service mail at 10 am, or set to send a service mail at working time, and the like, and the sending time of the mail may be specifically set according to the requirement of the actual service, which is not limited herein.
For the service mail with higher security requirement, the mail sending mode can be an encryption sending mode, and after the client encrypts the file to be sent in the mail cache pool according to a preset encryption mode, the encrypted mail is obtained and then sent, so that the security of the service mail is enhanced. For the service mails with large number sent at one time, the mail sending mode can be speed-limited or limited sending, so that congestion caused by over-high sending speed or over-high quantity or service mail loss caused by being regarded as an advertisement mail is avoided, and the mail sending mode can be specifically set according to the requirements of actual services, and is not limited here.
S802: and if the time for sending the mail is up, the client transfers a mail sending interface provided by the mail server, and sends the mail to be sent in the mail cache pool according to a mail sending mode.
Specifically, if the time for sending the mail in the mail cache pool is reached, the client transfers a mail sending interface provided by the mail server, sets an IP (Internet Protocol Address) Address of the mail server and port information for sending the mail, and the mail server sends the mail to be sent in the mail cache pool to a mailbox Address of a receiver through a network according to a corresponding mail sending mode.
Further, after the mail to be sent by the mail server successfully reaches the mail server of the receiver, the received mail is sent to the successful receipt, after all the mails to be sent in the mail cache pool are sent, if the mail to be sent which fails to be sent or does not receive the mail to be sent which is sent to the successful receipt is sent, the mail to be sent which fails to be sent or does not receive the mail to be sent which is sent to the successful receipt is sent again, and the mail to be sent which fails to be sent or does not receive the mail to be sent which is sent to the successful receipt is sent is output to the client, wherein the preset mail sending times can be specifically set according to actual needs, and the limitation is not made here.
In this embodiment, a to-be-sent mail is added to a mail cache pool in which a mail sending time and a mail sending mode are preset through a client, and if the mail sending time is reached, the client transfers a mail sending interface provided by a mail server and sends the to-be-sent mail in the mail cache pool according to the mail sending mode, so that flexible sending of a service mail is realized, and the mail sending success rate is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by functions and internal logic of the process, and should not limit the implementation process of the embodiments of the present invention in any way.
In one embodiment, a mail sending system is provided, and the mail sending system corresponds to the mail sending method in the above embodiment one to one. As shown in fig. 7, the mail sending system includes a mail server and a client, wherein the mail server includes a space creation module 71, a template configuration module 72 and a template sending module 73, and the client includes an identifier query module 74, a request sending module 75, a template selection module 76, a mail generation module 77 and a mail sending module 78. The functional modules are explained in detail as follows:
the mail sending system comprises a mail server and a client, wherein the mail server comprises:
the space creation module 71 is configured to receive user information input by a user on the mail management platform, create a storage space and a storage space identifier of the storage space for the user according to the user information, and store the user information and the storage space identifier in a preset user database in a corresponding manner;
the template configuration module 72 is used for receiving the mail template configured by the user on the mail management platform and storing the mail template in the storage space;
the template sending module 75 is configured to obtain a mail template in the storage space corresponding to the storage space identifier according to the template obtaining request, and send the mail template to the client, so that the user can make a selection;
the client comprises:
an identifier query module 74, configured to, if a mail sending request of a user is received, query a storage space identifier of the user in a preset user database according to user information that the user logs in at a client;
a request sending module 75, configured to send a template obtaining request to the mail server by using a template obtaining interface provided by the mail server according to the storage space identifier;
a template selecting module 76, configured to take the email template selected by the user as a target template;
a mail generating module 77, configured to fill the mail content included in the mail sending request in the target template, and generate a mail to be sent;
and the mail sending module 78 is configured to invoke a mail sending interface provided by the mail server, and send a mail to be sent through the mail server.
Further, the template configuration module 72 of the mail server includes:
the information checking submodule is used for checking the user information input by the user on the mail management platform according to the user information in the user database to obtain a checking result;
the template configuration sub-module is used for providing preset template basic configuration information for a user through the mail management platform if the verification result is that the verification is passed, so that the user configures the mail template according to the preset template basic configuration information;
and the template storage submodule is used for receiving the mail template configured by the user and storing the mail template into a storage space corresponding to the user information.
Further, the template sending module 73 of the mail server includes:
the data statistics submodule is used for acquiring the mail templates in the storage space corresponding to the storage space identification, and counting the requested times of each mail template and the selected times of the selected mail template as a target template in a preset time range;
the data calculation submodule is used for calculating the ratio of the selected times to the requested times of each mail template to obtain the historical use frequency of each mail template;
and the template sending submodule is used for sending the mail templates to the client according to the historical use frequency of the mail templates and the sequence of the historical use frequency from high to low.
Further, the mail server further comprises:
the user department query module is used for confirming the user department of the user according to the user information;
the associated template acquisition module is used for inquiring mail templates of other users in the same department as the user from a preset user database as associated mail templates according to the user department and calculating the historical use frequency of each associated mail template;
and the recommendation template sending module is used for acquiring the first N associated mail templates with the highest historical use frequency in the associated mail templates as recommendation templates according to the historical use frequency of the associated mail templates, and sending the recommendation templates to the client, wherein N is a positive integer.
Further, the mail sending module 78 of the client includes:
the mail cache submodule is used for adding the mail to be sent to a mail cache pool which presets the mail sending time and the mail sending mode;
and the mail sending submodule is used for calling a mail sending interface provided by the mail server and sending the mail to be sent in the mail cache pool according to a mail sending mode if the mail sending time is up.
For the specific limitations of the mail sending system, reference may be made to the above limitations of the mail sending method, which are not described herein again. The respective modules in the above mail sending system may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of transmitting a mail.
In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the processor implements the steps executed by the mail server or the client in the mail sending method according to the above embodiment, for example, steps S10 to S80 shown in fig. 2, or when the processor executes the computer program, the processor implements the functions of the modules of the mail server or the client in the mail sending system according to the above embodiment, for example, the functions of modules 71 to 78 shown in fig. 7. To avoid repetition, further description is omitted here.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps performed by the mail server or the client in the mail sending method in the above embodiment, or the processor implements the functions of the modules of the mail server or the client in the mail sending system in the above embodiment when executing the computer program. To avoid repetition, further description is omitted here.
It will be understood by those skilled in the art that all or part of the processes in the methods of the embodiments described above may be implemented by a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes corresponding to the mail service end or the client end in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the system is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A method for sending a mail, the method comprising:
the mail server receives user information input by a user on a mail management platform provided by the mail server, creates a storage space and a storage space identifier of the storage space for the user according to the user information, and correspondingly stores the user information and the storage space identifier into a preset user database;
the mail server receives a mail template configured by the user on the mail management platform and stores the mail template in the storage space;
if the client receives the mail sending request of the user, inquiring the storage space identification of the user in the preset user database according to the user information logged in by the user at the client;
the client sends a template acquisition request to the mail server by using a template acquisition interface provided by the mail server according to the storage space identifier;
the mail server side acquires a mail template in the storage space corresponding to the storage space identification according to the template acquisition request, and sends the mail template to the client side so as to enable the user to select;
the client takes the mail template selected by the user as a target template;
the client fills the mail content contained in the mail sending request into the target template to generate a mail to be sent;
the client calls a mail sending interface provided by the mail server and sends the mail to be sent through the mail server;
the mail template is configured according to the service content of each application project in the client;
the user, the storage space and the storage space identification correspond to each other one by one;
the storage space comprises at least one mail template; the template acquisition request comprises the storage space identifier; and the mail server side acquires a mail template in the storage space corresponding to the storage space identifier according to the template acquisition request, and sends at least one mail template to the client side so as to enable the user to select.
2. The method for sending mail according to claim 1, wherein the mail server receives the mail template configured by the user at the mail management platform, and stores the mail template in the storage space comprises:
the mail server side verifies the user information input by the user on the mail management platform according to the user information in the user database to obtain a verification result;
if the verification result is that the verification is passed, the mail server provides preset template basic configuration information for the user through the mail management platform, so that the user configures the mail template according to the preset template basic configuration information;
and the mail server receives the mail template configured by the user and stores the mail template in a storage space corresponding to the user information.
3. The method for sending the mail according to claim 1, wherein the mail server side obtains the mail template in the storage space corresponding to the storage space identifier according to the template obtaining request, and sends the mail template to the client side, including:
the mail server side obtains mail templates in the storage space corresponding to the storage space identification, and counts the requested times of each mail template and the selected times of the selected mail template as a target template in a preset time range;
the mail server calculates the ratio of the selected times to the requested times of each mail template to obtain the historical use frequency of each mail template;
and the mail server sends the mail template to the client according to the historical use frequency of the mail template from high to low.
4. The method as claimed in claim 3, wherein the user information includes a user department, and after the mail server sends the mail templates to the client according to the historical usage frequency of the mail templates from high to low, the method further comprises:
the mail server confirms the user department of the user according to the user information;
the mail server side inquires mail templates of other users in the same department as the user from the preset user database as associated mail templates according to the user department, and calculates the historical use frequency of each associated mail template;
and the mail server acquires the first N associated mail templates with the highest historical use frequency in the associated mail templates as recommended templates according to the historical use frequency of the associated mail templates, and sends the recommended templates to the client, wherein N is a positive integer.
5. The method for sending the mail according to claim 1, wherein the client calls a mail sending interface provided by the mail server, and sending the mail to be sent through the mail server comprises:
the client adds the mail to be sent to a mail cache pool with preset mail sending time and a mail sending mode;
and if the mail sending time is up, the client calls a mail sending interface provided by the mail server, and sends the mail to be sent in the mail cache pool according to the mail sending mode.
6. The mail sending system is characterized by comprising a mail server and a client, wherein the mail server is connected with the client through a network;
the mail server side comprises:
the space creation module is used for receiving user information input by a user on a mail management platform, creating a storage space and a storage space identifier of the storage space for the user according to the user information, and correspondingly storing the user information and the storage space identifier into a preset user database;
the template configuration module is used for receiving the mail template configured by the user on the mail management platform and storing the mail template in the storage space;
the template sending module is used for obtaining a mail template in the storage space corresponding to the storage space identifier according to a template obtaining request and sending the mail template to the client so as to enable the user to select the mail template;
the client comprises:
an identifier query module, configured to query, according to the user information that the user logs in at the client, a storage space identifier of the user in the preset user database if a mail sending request of the user is received;
the request sending module is used for sending a template obtaining request to the mail server by using a template obtaining interface provided by the mail server according to the storage space identifier;
the template selection module is used for taking the mail template selected by the user as a target template;
the mail generation module is used for filling the mail content contained in the mail sending request into the target template to generate a mail to be sent;
the mail sending module is used for calling a mail sending interface provided by the mail server and sending the mail to be sent through the mail server;
the mail template is configured according to the service content of each application project in the client;
the user, the storage space and the storage space identification correspond to each other one by one;
the storage space comprises at least one mail template; the template acquisition request comprises the storage space identifier; and the mail server side acquires a mail template in the storage space corresponding to the storage space identifier according to the template acquisition request, and sends at least one mail template to the client side so as to enable the user to select.
7. The mail transmission system according to claim 6, wherein in the mail server, the template configuration module includes:
the information checking submodule is used for checking the user information input by the user on the mail management platform according to the user information in the user database to obtain a checking result;
the template configuration sub-module is used for providing preset template basic configuration information for the user through the mail management platform if the verification result is that the verification is passed, so that the user configures the mail template according to the preset template basic configuration information;
and the template storage submodule is used for receiving the mail template configured by the user and storing the mail template in a storage space corresponding to the user information.
8. The mail transmission system according to claim 6, wherein in the mail server, the template transmission module includes:
the data statistics submodule is used for acquiring the mail templates in the storage space corresponding to the storage space identification, and counting the requested times of each mail template and the selected times of the selected mail template as a target template in a preset time range;
the data calculation submodule is used for calculating the ratio of the selected times to the requested times of each mail template to obtain the historical use frequency of each mail template;
and the template sending submodule is used for sending the mail template to the client according to the historical use frequency of the mail template from high to low.
9. Computer arrangement comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps performed by a mail server or a client in the method according to any of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the steps performed by a mail server or a client in the method for sending mail according to any one of claims 1 to 5.
CN201811093263.6A 2018-09-19 2018-09-19 Mail sending method, mail sending system, computer equipment and storage medium Active CN109104360B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811093263.6A CN109104360B (en) 2018-09-19 2018-09-19 Mail sending method, mail sending system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811093263.6A CN109104360B (en) 2018-09-19 2018-09-19 Mail sending method, mail sending system, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109104360A CN109104360A (en) 2018-12-28
CN109104360B true CN109104360B (en) 2022-11-25

Family

ID=64866709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811093263.6A Active CN109104360B (en) 2018-09-19 2018-09-19 Mail sending method, mail sending system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109104360B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109768919A (en) * 2019-01-29 2019-05-17 深圳市小满科技有限公司 E-mail sending method, device, computer installation and storage medium
CN110380949A (en) * 2019-05-24 2019-10-25 平安普惠企业管理有限公司 Intranet e-mail sending method, device, computer equipment and storage medium
CN110351182B (en) * 2019-05-31 2022-06-17 平安科技(深圳)有限公司 Mail sending method, device, equipment and computer readable storage medium
CN111181842A (en) * 2019-12-29 2020-05-19 苏州浪潮智能科技有限公司 Mail sending method and system based on different business logics
CN113595864B (en) 2020-04-30 2023-04-18 北京字节跳动网络技术有限公司 Method, device, electronic equipment and storage medium for forwarding mails
CN111918368A (en) * 2020-06-19 2020-11-10 深圳市有方科技股份有限公司 Internet of things wireless communication networking transmission method and device and computer equipment
CN115567478A (en) * 2021-07-01 2023-01-03 京东科技控股股份有限公司 Mail generating and sending method, device and storage medium
CN114363284B (en) * 2021-12-23 2024-03-19 深圳市六度人和科技有限公司 Mail batch sending method, device and storage medium based on mobile terminal
CN114500439B (en) * 2022-01-20 2024-05-14 统信软件技术有限公司 Mail downloading method, device, computing equipment and storage medium
CN117240819B (en) * 2023-11-10 2024-02-09 天津异乡好居网络科技股份有限公司 Mail configuration method, device, equipment and computer readable storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228166A (en) * 2018-03-15 2018-06-29 链家网(北京)科技有限公司 A kind of back-end code generation method and system based on template

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608559B (en) * 2015-12-28 2021-02-23 歌尔股份有限公司 Method and system for generating multi-language mail
US20170316363A1 (en) * 2016-04-28 2017-11-02 Microsoft Technology Licensing, Llc Tailored recommendations for a workflow development system
CN106375196A (en) * 2016-09-21 2017-02-01 广州视睿电子科技有限公司 Batch mail sending method and device
CN107395622A (en) * 2017-08-18 2017-11-24 四川长虹电器股份有限公司 Method without cipher safety authentication

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228166A (en) * 2018-03-15 2018-06-29 链家网(北京)科技有限公司 A kind of back-end code generation method and system based on template

Also Published As

Publication number Publication date
CN109104360A (en) 2018-12-28

Similar Documents

Publication Publication Date Title
CN109104360B (en) Mail sending method, mail sending system, computer equipment and storage medium
US10965772B2 (en) Interface invocation method and apparatus for hybrid cloud
CN108833521B (en) Message pushing method, device, system, computer equipment and storage medium
US20170317962A1 (en) Message sending method, apparatus, and system, and server
CN110351283B (en) Data transmission method, device, equipment and storage medium
CN110213223B (en) Service management method, device, system, computer equipment and storage medium
CN108829528B (en) Content sharing method and device, and message processing method and device
KR102660475B1 (en) Platform and method for certifying an electronic contract for electronic identification and trust services (eidas)
US20110302631A1 (en) Systems and methods for logging into an application on a second domain from a first domain in a multi-tenant database system environment
CN112073405A (en) Webpage data loading method and device, computer equipment and storage medium
US11323546B2 (en) Executing remote commands
WO2019226189A1 (en) Data loss prevention using category-directed parsers
CN109088812B (en) Information processing method, information processing device, computer equipment and storage medium
US20110238760A1 (en) Systems and methods for identifying contacts as users of a multi-tenant database and application system
CN111722947A (en) Service calling method and system
CN104732331A (en) Grouping management method, device and system
CN101729491A (en) Method, device and system for enhancing application reliability of script-based business
CN111988418B (en) Data processing method, device, equipment and computer readable storage medium
US11838246B2 (en) Platform-agnostic message relay service for inbound messages
CN113794999A (en) Short message distribution method, device and storage medium
CN108768928A (en) A kind of information acquisition method, terminal and server
CN108376154B (en) System base table synchronization method and device, computer equipment and storage medium
US11095460B2 (en) Certificate application operations
CN116308236A (en) Mail processing method, mail processing device, electronic equipment and storage medium
CN107819811B (en) Data communication method, device and 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
GR01 Patent grant
GR01 Patent grant