CN119814719A - Method, device, equipment, storage medium and program product for sending mail - Google Patents
Method, device, equipment, storage medium and program product for sending mail Download PDFInfo
- Publication number
- CN119814719A CN119814719A CN202411876378.8A CN202411876378A CN119814719A CN 119814719 A CN119814719 A CN 119814719A CN 202411876378 A CN202411876378 A CN 202411876378A CN 119814719 A CN119814719 A CN 119814719A
- Authority
- CN
- China
- Prior art keywords
- content
- target
- instruction
- 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
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The present disclosure provides methods, apparatuses, electronic devices, computer-readable storage media, and computer program products for sending mail, and relates to the technical fields of information transmission, communication technology, data processing, and other artificial intelligence technologies. The method comprises the steps of analyzing an initial mail to obtain mail content of the initial mail, wherein the initial mail is transmitted in based on a simple mail transmission protocol, responding to the mail content to include an instruction content part, executing an instruction to be executed corresponding to the instruction content part to obtain an execution result, generating a target mail in a target format based on a non-instruction content part of the mail content and the execution result, and transmitting the target mail to a target address indicated in the non-instruction content part. Therefore, more types and more kinds of mail contents can be added to the mails sent out based on the simple mail transmission protocol, so that the compatibility of message transmission can be improved, and different and diversified communication requirements can be met.
Description
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to the field of artificial intelligence technologies such as information transmission, communication technology, and data processing, and more particularly, to a method, an apparatus, an electronic device, a computer readable storage medium, and a computer program product for sending mail.
Background
With the development of computer technology, email is widely used by users as an information communication means. Through the electronic mail system of the network, the user can quickly and efficiently complete information communication with other users with very low communication cost.
The communication mode based on the E-mail is generally realized according to the following procedures that a user completes the writing of the E-mail on the used terminal equipment, the user provides the E-mail which completes the writing to the corresponding mailbox server through the terminal equipment, and after receiving the E-mail, the mailbox server can transmit the E-mail to the mailbox server corresponding to the target address based on the indicated target address so as to realize and complete the sending of the E-mail.
In such a background, how to improve the email sending efficiency of the user and improve the email sending experience of the user is worth focusing and urgent needs.
Disclosure of Invention
Embodiments of the present disclosure provide a method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product for sending mail.
In a first aspect, an embodiment of the present disclosure provides a method for sending a mail, including parsing an initial mail to obtain a mail content of the initial mail, where the initial mail is imported based on a simple mail transmission protocol, executing an instruction to be executed corresponding to the instruction content portion in response to the mail content including the instruction content portion to obtain an execution result, generating a target mail in a target format based on a non-instruction content portion of the mail content and the execution result, and sending the target mail to a target address indicated in the non-instruction content portion.
In a second aspect, an embodiment of the disclosure provides an apparatus for sending a mail, which includes an initial mail parsing unit configured to parse an initial mail to obtain a mail content of the initial mail, wherein the initial mail is imported based on a simple mail transmission protocol, an instruction content executing unit configured to execute an instruction to be executed corresponding to an instruction content portion in response to the mail content including the instruction content portion to obtain an execution result, a first mail generating unit configured to generate a target mail in a target format based on a non-instruction content portion of the mail content and the execution result, and a target mail sending unit configured to send the target mail to a target address indicated in the non-instruction content portion.
In a third aspect, an embodiment of the present disclosure provides an electronic device including at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to implement, when executed, a method of sending mail as described in any one of the implementations of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a non-transitory computer-readable storage medium storing computer instructions for enabling a computer to implement a method of sending mail as described in any of the implementations of the first aspect when executed.
In a fifth aspect, embodiments of the present disclosure provide a computer program product comprising a computer program which, when executed by a processor, is capable of implementing a method of sending mail as described in any of the implementations of the first aspect.
The method, the device, the electronic equipment, the computer readable storage medium and the computer program product for sending the mail provided by the embodiment of the disclosure analyze an initial mail to obtain mail content of the initial mail, wherein the initial mail is imported based on a simple mail transmission protocol, respond to an instruction content part included in the mail content, execute an instruction to be executed corresponding to the instruction content part to obtain an execution result, generate a target mail in a target format based on a non-instruction content part of the mail content and the execution result, and send the target mail to a target address indicated in the non-instruction content part.
The present disclosure enables more types and kinds of mail contents to be added to mails sent based on a simple mail transmission protocol, which can improve the compatibility of message transmission and meet different and diversified communication requirements.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture in which the present disclosure may be applied;
FIG. 2 is a flow chart of a process for sending mail provided by an embodiment of the present disclosure;
FIG. 3 is a flow chart of a process for obtaining mail content provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of an architecture for implementing a process of sending mail in an application scenario provided by an embodiment of the present disclosure;
Fig. 5 is a block diagram of an apparatus for sending mail according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device adapted to perform a method for sending mail according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness. It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other.
In addition, in the technical scheme related to the disclosure, the related processes of acquiring, storing, using, processing, transporting, providing, disclosing and the like of the personal information of the user all conform to the regulations of related laws and regulations and do not violate the popular regulations of the public order.
For example, in the case where an initial mail is sent by a user, the parsing process for the mail content of the initial mail is known and allowed by the user. For example, the user may learn, by way of pre-authorization, etc., that the mail content of the initial mail it sent will be parsed and permitted.
FIG. 1 illustrates an exemplary system architecture 100 to which embodiments of the methods, apparatuses, electronic devices, and computer-readable storage media of the present disclosure for sending mail may be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, a network 103, a server 104, and a server 105. Network 103 may be used to provide media for communication links between terminal device 101, terminal device 102, server 104, and server 105. The network 103 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
By way of example, server 104 may be understood as a corresponding "mailbox server" with which terminal device 101 is associated. For example, the server 104 may be configured to receive (e) mail transmitted by the terminal device 101 and transmit it as instructed by the terminal device 101. Also, the server 104 may also receive the mail sent to the terminal device 101, and issue and provide it to the terminal device 101.
Similarly, server 105 may be exemplified as a corresponding "mailbox server" associated with terminal device 102.
Accordingly, in such a context, when a user of terminal device 101 desires to send (e) mail to a user of terminal device 102, the mail may be delivered sequentially through the communication link of terminal device 101-server 104-server 105-terminal device 102. Accordingly, the user of the terminal device 102 can read the mail by using the terminal device 102.
Accordingly, between the terminal device and the corresponding server, an application for realizing "email" communication can be installed accordingly. Taking the terminal device 101 and the corresponding server 104 as examples, various applications for implementing information communication between the two may be installed between the two, for example, an email application, an instant messaging application, and the like.
The terminal device 101, the terminal device 102, the server 104, and the server 105 may be hardware or software. When the terminal devices 101, 102 are hardware, they may be various electronic devices with display screens, including but not limited to smartphones, tablet computers, laptop computers, desktop computers, etc., and when the terminal devices 101, 102 are software, they may be installed in the above-listed electronic devices, which may be implemented as a plurality of software or software modules, or as a single software or software module, which is not particularly limited herein. When the servers 104 and 105 are hardware, they may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server, and when the servers are software, they may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, which is not specifically limited herein.
The server 104 can provide various services through various built-in applications, for example, an email box type application capable of providing an email communication service, and when the email box type application is run, the server 104 can achieve the effects that firstly, an initial email which is input based on a simple email transmission Protocol (SIMPLE MAIL TRANSFER Protocol, abbreviated as SMTP) is acquired from the terminal equipment 101 through the network 103, then, the server 104 analyzes the initial email to obtain the email content of the initial email, next, if an instruction content part is included in the email content, the server 104 responds to the email content, an instruction to be executed corresponding to the instruction content part is executed to obtain an execution result, next, the server 104 generates a target email in a target format based on a non-instruction content part of the email content and the execution result, and finally, the server 104 sends the target email to a target address indicated in the non-instruction content part.
Since parsing a mail and generating a target mail in a target format may often require more computing resources and stronger computing power, the method for sending a mail provided in the subsequent embodiments of the present disclosure is generally performed by the server 104 having stronger computing power and more computing resources, and accordingly, the device for sending a mail is also generally disposed in the server 104. However, it should be noted that, when the terminal device 101 also has the required computing capability and computing resources, the terminal device 101 may also complete each operation performed by the server 104 through the email application installed thereon, and further output the same result as the server 104. Particularly, in the case that a plurality of terminal devices with different computing capabilities exist at the same time, when the email box application judges that the terminal device has a stronger computing capability and more computing resources remain, the terminal device can execute the above computation, so that the computing pressure of the server 104 is properly reduced, and correspondingly, the device for sending the email can also be arranged in the terminal device 101. Similarly, the above configuration may be similarly implemented for a combination of the terminal device 102 and the server 105, and the description will not be repeated here.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring to fig. 2, fig. 2 is a flowchart of a method for sending a mail according to an embodiment of the disclosure, where the flowchart 200 includes the following steps:
Step 201, analyzing the initial mail to obtain mail content of the initial mail;
In the embodiment of the present disclosure, this step aims at parsing the content of an initial mail after acquiring the initial mail (for example, the initial mail is sent by the terminal device 101) by the execution body of the method of sending mail (for example, the server 104 shown in fig. 1).
Communication between the terminal apparatus 101 and the server 104 may be achieved by SMTP, i.e. the initial mail is incoming based on SMTP (simple mail transfer protocol).
SMTP is a standard communication protocol for transmitting (e-mail) messages in a computer network. The main function of SMTP is to ensure that mail is transferred from a sender's mail client to a recipient's mailbox server through a mailbox server, and finally received by the recipient's mail client. SMTP is a push protocol that is specifically used for sending mail and does not involve the reception and storage of mail.
For example, the user may communicate with the execution body based on SMTP using the terminal apparatus 101 to transmit the initial mail. For example, a user may compose and send such an initial mail to the execution body through, for example, an email application configured at the terminal device 101 to send the initial mail to a target address, the target device (e.g., the target address may be an address of one of the servers 105 pointing to the terminal device 102), using the execution body.
For example, in one exemplary scenario, the executing entity may be, for example, an enterprise mail management server (which may manage mails of a plurality of terminal devices at the same time, provide a "mailbox server") that may receive, through SMTP, an initial mail sent by a terminal device inside the enterprise, under the enterprise network, and then send the initial mail or the processed initial mail to a destination address indicated by the initial mail, directly or based on a certain processing policy.
In general, the parsed mail contents may be distinguished into instruction contents and non-instruction contents based on the type. The instruction content may correspond to an action code having an action execution effect.
Accordingly, the user can provide instruction contents by adding an action code in the mail to instruct the execution body to correspondingly execute an action based on the instruction contents.
For example, the instruction content may be a piece of action code that can be executed to achieve a function, purpose. For example, when the function is to desire to acquire an image, the instruction content may be to perform a file extraction operation from the XX address, and the "file" is actually a stored file of the "image". Similarly, the instruction content may also be used to instruct the retrieval of video, audio files, or to perform operations (e.g., encrypt mail content of non-instruction content portions), etc.
Here, a function of "acquire, add image (file)" is exemplified. Accordingly, for example, when a user desires to add an image to an initial mail, the user may instruct the execution subject to execute such an action code by way of programming such an action code into the initial mail, to acquire a corresponding image.
But not the instruction content, may typically be e.g. the mail content included in the initial mail, e.g. the recipient's address representing the target address (and the recipient being transcribed), the text of the words in the mail, the time of sending the mail, etc. These non-instruction content often need only be used, provided, sent in-situ, and are not required, or "executed" by the executing body as desired by the user.
Step 202, executing an instruction to be executed corresponding to the instruction content part in response to the mail content comprising the instruction content part, and obtaining an execution result;
In an embodiment of the present disclosure, after the mail is parsed based on the step 201, if the mail content includes an instruction content portion (i.e., a portion including instruction content), the execution body may select to-be-executed instructions (i.e., corresponding action codes) corresponding to the instruction content portion to be executed correspondingly, so as to obtain an execution result.
For example, as discussed above, if the mail content includes an instruction content portion of "acquire image (file)", the execution subject may execute an instruction to be executed corresponding to the instruction content portion to acquire the corresponding "image (file)".
Step 203, generating a target mail in a target format based on the non-instruction content part of the mail content and the execution result;
In an embodiment of the present disclosure, after the execution result is obtained based on the step 202, the execution body may select to obtain the final sent target mail based on the non-instruction part in the mail content and the instruction result.
The target format of the target mail is often different from SMTP (or, not the supported format corresponding to SMTP), so that the target mail in the target format can be added with content such as images, audio, video, etc., which cannot be supported and presented by SMTP.
In some alternative implementations of the present embodiment, the target format may be a multipurpose internet mail extension format in order to promote compatibility of the target mail.
The Multipurpose Internet Mail Extensions (MIME) format is a standard for (e) mail transmission. The use of MIME can extend the mail protocol that can only transfer plain text, such as SMTP, so that mail can support a variety of formats of content, such as text, pictures, audio, video, attachments, etc.
Accordingly, the execution body can process the mail contents in the MIME format for the mail contents of the non-instruction part to form the corresponding contents in the target mail.
For example, for data such as transmission time, mail header, mail content text, sender address, recipient address, transcript address, etc., the executing body may directly process the content as content in the target mail in MIME format.
In addition, the execution body can add the execution result to the target mail in MIME format in response to the execution result.
In other words, the target mail in the target format generated by the execution body includes mail contents including non-instruction content parts in the original initial mail, and execution results obtained by executing the instruction to be executed.
Thus, in this way, the user can provide, add, in the mail that communicates with SMTP (i.e., the initial mail described above), contents such as images, videos, audios, etc., that cannot be transmitted by SMTP in the manner of "acquisition action". At the same time, such a manner also allows the user to configure the content in the target mail by means of the "instruction to be executed" (e.g., instruct the execution body to execute "processing" by the instructed operation to obtain the target mail desired by the user).
Step 204, sending the target mail to the target address indicated in the non-instruction content portion.
In an embodiment of the present disclosure, after obtaining the target mail based on step 203 described above, the execution body may issue the target mail (i.e., issue the target mail to the target address) based on the target address indicated in the non-instruction content portion.
At the time of transmission, the execution body may realize transmission of the target mail based on a transmission protocol which allows communication corresponding to the target address. The communication protocol corresponding to the target address is generally capable of supporting presentation of the entire contents of the target mail. For example, the communication protocol may be a WebSocket protocol or the like that is configured, maintained in advance.
For example, in connection with the system architecture 100 shown in fig. 1, the target address may be an address of the terminal device 102 corresponding to the server 105. Accordingly, the execution body may communicate the target mail in the target format with the server 105 based on the WebSocket protocol to complete the sending of the target mail. For example, the execution body sends the target mail to the server 105 based on the WebSocket protocol (for example, a mail interface calling a corresponding channel may be provided in the initial mail in a manner of "non-instruction content", for example), so that the terminal device 102 may acquire the target mail later by accessing the server 105 or by being issued by the server 105.
Further as discussed above, the execution body may maintain, for different target addresses, a communication protocol corresponding to each target address (e.g., the server to which the target address actually corresponds). Therefore, in the process of executing the step, the subsequent execution main body can select the communication protocol corresponding to the target address to finish transmission. In some scenarios, the executing body may achieve the goal of maintaining the protocol by maintaining one transmit port. For example, the execution body may implement the transmission purpose of the target mail by calling the transmission port based on the protocol for the target address configured by the transmission port.
In this way, the mail sender is still able to "extend SMTP" through the execution body without configuring, for example, webSocket protocol, corresponding to the destination address (i.e., even if the user is based on SMTP communicating with the execution body, it is still able to provide "mail content such as image, video, audio, etc. that is not directly supported by SMTP" in the initial mail) to complete the transmission of the complete mail content.
It should be appreciated that the executing entity may typically determine the protocol to be used based on the destination address indicated therein after parsing out the non-instruction content portion. In such a case, the execution body may refer to the protocol in generating the target mail, and generate the target mail based on the corresponding target format in which the protocol is configured. Thus, communication to secure the target mail can be supported by the protocol.
Accordingly, it is still possible for the initial mail provider to have the capability of sending content such as images, videos, etc. based on SMTP with the executing body, which can also reduce the protocol configuration requirement between the provider and the executing body (i.e., there is no need to require that the executing body and the provider of the initial mail be configured with, for example, webSocket protocol, provide the mail in MIMT format, etc. to achieve the sending requirement such as adding images, videos in the mail).
The method for sending the mail comprises the steps of analyzing an initial mail to obtain mail content of the initial mail, responding to the mail content including an instruction content part, executing an instruction to be executed corresponding to the instruction content part to obtain an execution result, generating a target mail in a target format based on a non-instruction content part and the execution result of the mail content, and sending the target mail to a target address indicated in the non-instruction content part. Therefore, more types and more kinds of mail contents can be added to the mails sent out based on the simple mail transmission protocol, so that the compatibility of message transmission can be improved, and different and diversified communication requirements can be met.
Referring to fig. 3, fig. 3 is a flowchart of a process for obtaining mail content according to an embodiment of the present disclosure, including a process 300. For example, process 300 may be implemented as an alternative or alternative to step 201 described above.
The process 300 specifically includes the steps of:
Step 301, determining an end-of-line character included in code data of an initial mail;
specifically, after the execution body acquires the initial mail, the execution body may read the code data of the initial mail and determine an end-of-line symbol included in the code data of the initial mail (LINE ENDINGS). An end of line symbol, a control character or character sequence for identifying the end position of the line. For example, the end of Line symbol may be the position of a Carriage Return Line Feed (CRLF).
Step 302, dividing mail content units based on the end-of-line symbol;
Specifically, the execution body, after determining each line terminator based on the above-described step 301, may determine "each line content" included in the code data based on the line terminator.
The execution body may then segment out the mail content units based on mail content belonging to the same type (e.g., both belonging to the recipient address, both belonging to the mail header, etc.).
For example, for MIME format, the execution body may segment out mail content units by way of boundary (boundary) separation.
A boundary is a special string that separates different parts. The boundary identifiers ensure that confusion between parts does not occur and can be resolved correctly. The content of each portion is included between the beginning and end of this boundary identifier. Accordingly, the code data represented between the beginning and end of the boundary identifier may be considered as a mail content unit.
Step 303, obtaining the sub-mail content corresponding to each mail content unit based on the matching result of the fields included in each mail content unit and the preset fields.
Specifically, after determining each mail content unit based on the above step 302, the execution body may match the fields included in each mail content unit with a preset field (for example, a field that can be used in advance to determine the type to which the mail content belongs).
Then, the execution body determines, based on the preset field hit in the matching result, the type of the mail content corresponding to the preset field as the parsing result corresponding to the mail content unit (i.e., the sub-mail content corresponding to the mail content unit).
For example, the parsing result may indicate the instruction content portion to which the mail content unit corresponds, or which specific non-instruction content portion corresponds (e.g., corresponding to the recipient address).
In some alternative implementations of the present embodiment, if the subsequent target format is MIME format, the executing body may parse the initial mail based on the MIME format criteria as well when parsing the initial mail. Accordingly, because the Content-Type header in MIME format generally specifies the Type of mail Content in the corresponding mail Content unit, the execution body may also select the Content based on the Content-Type header to determine the corresponding email Content for each mail Content unit.
It should be appreciated that after determining the content of each email, the execution body has actually completed parsing the initial email, resulting in the email content of the initial email. Since the mail contents are actually composed of the individual sub-mail contents, the determination of the individual sub-mail contents is equivalent to the determination of the mail contents in practice.
In other words, the mail content is actually composed of the determined content type corresponding to each piece of mail content and "code data" under each piece of mail content. After determining the code data corresponding to and associated with each email content and the content type (for example, instruction content or non-instruction content) corresponding to each email content, the parsing of the initial email is actually completed, and the email content of the initial email is obtained.
Therefore, the method can avoid crossing and confusion among different mail contents by dividing the mail content units and determining the boundary, and can analyze the mail contents more accurately.
In some embodiments, in the case where the mail content includes an instruction content portion, the execution body may select to execute an instruction to be executed corresponding to the instruction content portion to obtain an execution result.
In such a process, the execution body determines that the mail content includes an instruction content portion, and responds to the fact that the instruction content portion is first selected to be parsed by a regular expression or a state machine model (STATE MACHINE) to obtain an action code and an action parameter. A state machine model is a mathematical model that can be used to identify changes, behaviors, etc. that are expected to be performed.
Accordingly, action codes that maintain some criteria (i.e., can be used to instruct execution of "action" codes) may be selected in advance, and then after the execution subject determines the instruction part content, the execution subject may compare these criteria action codes with the instruction part content by way of a regular expression, or extract the action code corresponding to "action" in the instruction part content with these criteria action codes as references using a state machine model.
And, after determining the "action code", the execution body may extract the action code from the instruction content portion and then use the remaining portion as the action parameter.
For example, in the case where the purpose of the instruction content portion is to obtain an image from "XX", the action code may be "extract, obtain action", and accordingly, the action parameter may be "XX" embodied as a storage address, for example, the "XX" may be a uniform resource locator (Uniform Resource Locator, abbreviated as URL).
Then, the execution body may execute the action code according to the action parameter accordingly, to obtain an execution result.
Therefore, by means of regular expressions and state machine models, two parts of action codes and action parameters in the instruction content part can be distinguished more accurately and strictly, so that the 'action' expected to be executed, the content and parameters pointed by the 'action' can be identified more accurately, and action errors and the like caused by inaccurate identification are avoided. Thus, the identification and execution accuracy of the instruction to be executed can be improved.
In some embodiments, in order to facilitate editing by the user, providing "actions" during editing of the initial mail by the user, the user may also indicate the action code and action parameters by adding means such as an identification field (e.g., "Act").
Similarly, the execution body may also provide the user with these standard actions upon request of the user, so that the user refers to these standard actions to edit the initial mail.
Further, based on different requirements, the target mail can also comprise non-instruction content parts and content except for execution results, so that reference is expected to be provided for a user receiving the target mail, and information acquisition efficiency of the user is improved.
In some optional implementations of this embodiment, if the execution result is an attachment file (e.g., an image file), the execution body may also select to further correspond to the attachment file, and generate a corresponding preview picture.
The execution body may then, in performing, for example, step 203, generating the target mail in the target format, alternatively or in addition, select to generate the target mail in the target format based on the non-instruction content portion of the mail content, the execution result, and the preview picture.
That is, the execution body further adds "preview pictures" to the target mail in the process of generating the target mail. Therefore, the subsequent target mail receiver can read the content in the target mail more efficiently based on the preview picture.
In some optional implementations of this embodiment, for the attachment file, there may be a difference in the content in the corresponding preview picture based on the difference in the form. For example, for an attachment file to an image file, its "content" may be image content. For another example, for an attachment file to a video file, its "content" may be the cover content of the video.
In some scenarios, for example, for content such as video, audio, summary information corresponding to the video content and audio content may be provided in the "preview picture" (e.g., after a picture is generated based on the summary information, the summary information is added to the target mail as a preview picture).
In some embodiments, in the process of executing step 203 to generate the target mail in the target format, the executing body may further select to generate the target mail in the target format according to the non-instruction content part, the instruction content part and the execution result.
That is, the execution body may select, as an alternative or alternative to step 203, a target mail in a target format to be generated with the non-instruction content portion, the instruction content portion, and the execution result. This allows the targeted mail to also be presented with the instruction content portion simultaneously.
Thus, different and differentiated use requirements of users are met by means of the presented instruction content parts. For example, the user can quickly complete editing of a subsequent mail by, for example, modifying, adjusting the instruction content portion, or acquire "action parameters" such as URL, or the like.
In some embodiments, if the mail content does not have an instruction content portion, the execution body may also generate a target mail in a target format based on the mail content directly based on the manner discussed above. That is, mail under the SMTP protocol is adjusted to a target mail under a target format, and transmission is given.
Thus, in this way, the initial mail under the SMTP protocol can be adjusted to the target mail under the target format with stronger compatibility and adaptability. The method and the system enable the subsequent mail receiver to utilize the target mail in the target format to realize operations such as secondary editing, forwarding and the like, and can improve the subsequent mail circulation efficiency.
In some embodiments, parsing errors may also occur for the parsing process of the mail content of the initial mail (e.g., there is code data that cannot be recognized by the executing body due to writing errors of the code data in the initial mail).
Accordingly, if an parsing error occurs in the process of parsing the initial mail to obtain the mail content (for example, a part of code data cannot be recognized, and an action corresponding to the recognized code data cannot be actually implemented due to an action parameter error), the execution body may generate error information corresponding to the simple mail transmission protocol in response to the parsing error.
That is, if an parsing error occurs, the execution body may determine error-reporting information (e.g., the content form of the error-reporting information may be description information indicating "code data" that cannot be recognized) based on the specific cause of the error.
It should be understood that the error message should be one that the simple mail transfer protocol can send in its entirety (e.g., the error message is "plain text").
The executing body may then choose to send error information to the provider of the initial mail based on the simple mail transfer protocol to indicate that the provider of the initial mail is "in error" and provide feedback to the provider.
Thus, the error information execution body can synchronize the error information to the provider of the initial mail under the condition that the analysis is wrong, so as to request and indicate that the provider of the initial mail needs to update and correct the initial mail, and the error information execution body can not process the initial mail and send the processed initial mail. Therefore, not only can the provider of the initial mail conveniently and efficiently complete error correction, but also the resource waste and the trouble of a receiver caused by error transmission can be avoided.
In some embodiments, the execution body may also maintain an error code for the error type for which the error is common, so that the error type that exists is indicated by the error code.
In some embodiments, the executing body may also choose to actually provide the error information by means of images, videos, etc. for communication efficiency, in which case the executing body may also similarly return the action code (or URL) that may be executed in "literal" form to the provider of the initial mail by means of editing the action code, action parameters that may be executed.
For example, the executing body may store the image to a URL and return the URL to the provider of the initial mail (or return an action code for acquiring the image from the URL to the provider of the initial mail).
Accordingly, the execution subject may acquire the "image", "video", etc. returned by the execution subject using SMTP by means of local execution after acquiring the code to be acted, or clicking URL.
On the basis of any of the above embodiments, in order to further enhance the compatibility of the target mail, when the execution body sends the target mail (for example, when step 204 is executed), the execution body may alternatively or alternatively send the target mail to the target address indicated in the non-instruction content portion through the hypertext transfer protocol.
The hypertext transfer protocol (HTTP, hypertext Transfer Protocol) is a protocol for transferring web pages and other resources in a network. It is the underlying protocol for data exchange between the Web and the browser, defining rules for communication between the client (typically a Web browser) and the server. HTTP belongs to an application layer protocol, which enables clients to request resources on a server based on a request/response mode, and the server returns corresponding data.
Therefore, the characteristics of HTTP are utilized, so that the target mail can be sent to the target address on the basis of accurately sending the target mail without losing data, communication can be realized between the browser and the Web server, and more efficient, convenient and multi-scene mail sending experience can be provided for users.
For further understanding, the disclosure further provides a specific implementation scheme of the mail sending process provided by the embodiment of the disclosure in combination with a specific application scenario.
For this, please refer to fig. 4. Fig. 4 an architecture diagram of an exemplary architecture for implementing a process of sending mail, including architecture 400, is provided in an embodiment of the present disclosure.
For ease of understanding, the description will be presented with reference to the system architecture 100 shown in fig. 1.
In architecture 400, for terminal device 101, it may communicate with its corresponding server 104 as a mailbox server in "SMTP".
While for server 104 it may communicate with the "mailbox server" of other terminal devices in HTTP. For example, the server 104 may communicate with a mailbox server 105 of the terminal device 102, which is not directly shown in fig. 4, in HTTP.
In the architecture 400, the terminal device 101 may perform S401 based on SMTP, sending an initial mail 410 to the server 104.
The initial mail 410 may include an instruction content portion 411 and non-instruction portions 412-414.
Server 104, after receiving initial mail 410, may then parse initial mail 410 to determine instruction content portion 411, and non-instruction portions 412-414. Then, in response to parsing out the instruction content portion 411, the server 104 executes S402 to execute an execution instruction corresponding to the instruction content portion 411, resulting in an execution result 421 (for example, the execution instruction actually acquires an image file from a specific URL).
Next, the server 104 continues to execute S403 to generate the target mail 430 in the target format based on the non-instruction sections 412-414 and the execution result 421.
Finally, the server 104 may execute S404 to send the target mail 430 to the server 105, for example, indicated by the non-instruction section 413, based on HTTP to complete the sending of the target mail.
With further reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of an apparatus for sending mail, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 5, the apparatus 500 for transmitting mail of the present embodiment may include an initial mail parsing unit 501, an instruction content executing unit 502, a first mail generating unit 503, and a target mail transmitting unit 504. Wherein the initial mail parsing unit 501 is configured to parse the initial mail to obtain a mail content of the initial mail, wherein the initial mail is imported based on a simple mail transmission protocol, the instruction content executing unit 502 is configured to execute an instruction to be executed corresponding to the instruction content part in response to the mail content including the instruction content part to obtain an execution result, the first mail generating unit 503 is configured to generate a target mail in a target format based on a non-instruction content part of the mail content and the execution result, and the target mail transmitting unit 504 is configured to transmit the target mail to a target address indicated in the non-instruction content part.
In the device 500 for sending a mail, the specific processing and the technical effects of the initial mail parsing unit 501, the instruction content executing unit 502, the first mail generating unit 503, and the target mail sending unit 504 of the to-be-annotated picture obtaining unit may refer to the relevant descriptions of steps 201 to 204 in the corresponding embodiment of fig. 2, and are not repeated herein.
In some optional implementations of this embodiment, the initial mail parsing unit 501 includes a terminator-of-line determining subunit configured to determine a terminator of line included in code data of an initial mail, a content unit splitting unit configured to split mail content units based on the terminator of line, and an initial mail parsing subunit configured to obtain sub-mail contents corresponding to each mail content unit based on a matching result of a field included in each mail content unit and a preset field, where the mail contents are composed of each sub-mail content.
In some optional implementations of this embodiment, the instruction content execution unit 502 includes a code and parameter determination subunit configured to parse the instruction content portion through a regular expression or a state machine model in response to the mail content including the instruction content portion, to obtain an action code and an action parameter, and an instruction portion execution subunit configured to execute the action code according to the action parameter, to obtain an execution result.
In some optional implementations of this embodiment, the apparatus 500 further includes a preview picture generating unit configured to generate a preview picture corresponding to the attachment file in response to the execution result being the attachment file, and a first mail generating unit further configured to generate the target mail in the target format according to the non-instruction content portion of the mail content, the execution result, and the preview picture.
In some optional implementations of this embodiment, the first mail generating unit 503 is further configured to generate the target mail in the target format according to the non-instruction content portion, the instruction content portion, and the execution result.
In some alternative implementations of the present embodiment, the apparatus 500 further includes a second mail generation unit configured to generate a target mail in the target format based on the mail content in response to the mail content not having the instruction content portion.
In some optional implementations of this embodiment, the apparatus 500 further includes an error information generating unit configured to generate error information corresponding to the simple mail transmission protocol based on code data of the initial mail corresponding to the analysis error in response to an analysis error occurring in the process of analyzing the initial mail to obtain the mail content, and an error information providing unit configured to send the error information to a provider of the initial mail based on the simple mail transmission protocol.
In some alternative implementations of the present embodiment, the target mail sending unit 504 is further configured to send the target mail to the target address indicated in the non-instruction content portion via a hypertext transfer protocol.
In some alternative implementations of the present embodiment, the target format includes a multipurpose Internet mail extension format.
The embodiment exists as an embodiment of a device corresponding to the embodiment of the method, and the device provided by the embodiment analyzes an initial mail to obtain mail content of the initial mail, wherein the initial mail is imported based on a simple mail transmission protocol, executes an instruction to be executed corresponding to the instruction content part to obtain an execution result in response to the fact that the mail content comprises the instruction content part, generates a target mail in a target format based on a non-instruction content part of the mail content and the execution result, and sends the target mail to a target address indicated in the non-instruction content part. Therefore, more types and more kinds of mail contents can be added to the mails sent out based on the simple mail transmission protocol, so that the compatibility of message transmission can be improved, and different and diversified communication requirements can be met.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including an input unit 606, e.g., keyboard, mouse, etc., an output unit 607, e.g., various types of displays, speakers, etc., a storage unit 608, e.g., magnetic disk, optical disk, etc., and a communication unit 609, e.g., network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the respective methods and processes described above, for example, a method of sending mail. For example, in some embodiments, the method of sending mail may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into RAM 603 and executed by computing unit 601, one or more steps of the method of sending mail described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the method of sending mail in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be a special or general purpose programmable processor, operable to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user, for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback), and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a Local Area Network (LAN), a Wide Area Network (WAN), and the Internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical host and Virtual Private Server (VPS) PRIVATE SERVER service. Servers may also be divided into servers of a distributed system or servers that incorporate blockchains.
According to the technical scheme of the embodiment of the disclosure, the initial mail is analyzed to obtain mail content of the initial mail, wherein the initial mail is transmitted based on a simple mail transmission protocol, an instruction to be executed corresponding to the instruction content is executed to obtain an execution result in response to the fact that the mail content comprises the instruction content, a target mail in a target format is generated based on a non-instruction content part of the mail content and the execution result, and the target mail is sent to a target address indicated in the non-instruction content part. Therefore, more types and more kinds of mail contents can be added to the mails sent out based on the simple mail transmission protocol, so that the compatibility of message transmission can be improved, and different and diversified communication requirements can be met.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions provided by the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.
Claims (21)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411876378.8A CN119814719A (en) | 2024-12-18 | 2024-12-18 | Method, device, equipment, storage medium and program product for sending mail |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411876378.8A CN119814719A (en) | 2024-12-18 | 2024-12-18 | Method, device, equipment, storage medium and program product for sending mail |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN119814719A true CN119814719A (en) | 2025-04-11 |
Family
ID=95268680
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202411876378.8A Pending CN119814719A (en) | 2024-12-18 | 2024-12-18 | Method, device, equipment, storage medium and program product for sending mail |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN119814719A (en) |
-
2024
- 2024-12-18 CN CN202411876378.8A patent/CN119814719A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10218657B2 (en) | Method and system for providing private chat within a group chat | |
| EP3068070B1 (en) | Method and device for initiating network conference | |
| US20110185024A1 (en) | Embeddable metadata in electronic mail messages | |
| CN102238106A (en) | News Feed Technology | |
| WO2013091550A1 (en) | Method and device for posting microblog message | |
| EP3552376B1 (en) | Card-based information management method and system | |
| US20170200244A1 (en) | Systems and Techniques for Integrating Electronic Signature Platforms with Social Messaging Applications for Authenticated Electronic Documents | |
| WO2021093673A1 (en) | E-mail sending method, apparatus and device, and computer-readable storage medium | |
| CN108293016A (en) | Attachment Reply Handling in Web Messaging Systems | |
| US10693820B2 (en) | Adding images to a text based electronic message | |
| CA3061623C (en) | File sending in instant messaging applications | |
| CN113779018B (en) | A data processing method and device | |
| CN110120908B (en) | Group message processing method and device and server | |
| CN109753424B (en) | Method and apparatus for AB testing | |
| CN113407749B (en) | Image index construction method, device, electronic device and storage medium | |
| CN113641359B (en) | A data processing method and device | |
| CN103853544A (en) | Method and device for generating hyperlinks as well as terminal | |
| US11863525B2 (en) | Contact passlisting across digital channels | |
| CN113114557B (en) | Message sending method and device, electronic equipment and storage medium | |
| CN119814719A (en) | Method, device, equipment, storage medium and program product for sending mail | |
| CN108810105A (en) | For pushed information, the method and apparatus for showing information | |
| CN115828864A (en) | Supplementary protocol generation method, device, equipment and storage medium | |
| US10846468B2 (en) | Apparatus and methods for creating and sending table information | |
| CN113761039B (en) | A method and device for processing information | |
| CN118250341B (en) | Form request processing method, device, equipment and storage medium |
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 |