CN1889106B - Method for separately keeping mail appendix - Google Patents

Method for separately keeping mail appendix Download PDF

Info

Publication number
CN1889106B
CN1889106B CN2005100802569A CN200510080256A CN1889106B CN 1889106 B CN1889106 B CN 1889106B CN 2005100802569 A CN2005100802569 A CN 2005100802569A CN 200510080256 A CN200510080256 A CN 200510080256A CN 1889106 B CN1889106 B CN 1889106B
Authority
CN
China
Prior art keywords
mail
annex
mime
content
appendix
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
CN2005100802569A
Other languages
Chinese (zh)
Other versions
CN1889106A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN2005100802569A priority Critical patent/CN1889106B/en
Publication of CN1889106A publication Critical patent/CN1889106A/en
Application granted granted Critical
Publication of CN1889106B publication Critical patent/CN1889106B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

This invention discloses a method that separating and preserving the accessories of mail, to solve the problem that the handling efficiency of separating and preserving the accessories of mail is not high with the existing technology. The invention judges that whether there is separate display accessories in the mail by analysing the MIME segment of mail code, if it exists, decoding the accessories code content; picking up and saving the decoding accessories content from the mail. The invention the solved the problem that the handling efficiency of separating and preserving the accessories of mail is not high with the existing technology, making the consumer more convenient to manage the accessories ,the consumer can handle the accessories without the mail customer terminal software.

Description

The method of separate keeping mail appendix
Technical field
The present invention relates to the mail communication technology in the computer network, relate in particular to a kind of method of separate keeping mail appendix.
Background technology
E-mail communication is a kind of communication means that generally uses at present, and the transmitting-receiving of mail is one of computer network most important function.Use Mail Clients software,, can effectively manage Email as Foxmail, Outlook etc.
As shown in Figure 1, the management of Email is typically used Mail Clients software and mail is collected from mail server this machine carries out.Email often has annex in transmission course, we can by the corresponding program of Mail Clients software activation to check or handle postal matter in annex.Common employing dual mode is preserved the annex in the mail in the prior art, a kind of mode is to save attachment by the mail of preserving the band annex, the shortcoming of this mode is: can not directly check annex, must just can check annex after Mail Clients software is opened mail.Another kind of mode is that the user exists assigned address by operation Mail Clients software in addition with the annex in the mail, and the shortcoming of this mode is: when the annex that will preserve more for a long time, not high to the treatment effeciency of mail.
Summary of the invention
The invention provides a kind of method of separate keeping mail appendix, the annex in the mail is separated the not high problem of handling of efficient of preserving in order to solve to exist in the prior art.
The inventive method comprises:
A kind of method of separate keeping mail appendix comprises step:
A, mail, judge whether the coded format of this mail is the MIME form, if execution in step B if not, finishes from mail server;
B1, judge in the mail coding whether have MIME section with content display mode field, if then this mail has annex, execution in step B2, otherwise, finish;
The content of B2, viewing content display mode field, if showing described annex in the content of content display mode field be the annex of demonstration separately, then the annex encoded content is decoded and preserve according to the shown type of coding of digital coding mode field in the described MIME section.
In the described steps A, judge according to whether having the MIME version number field in the mail coding whether the coded format of mail is the MIME form.
From mail, extract decoded attachment content, the annex that extracts is named and preserved according to the file name parameter in the content display mode field in the MIME section.
If do not have file name parameter in the described content display mode field, then the annex that extracts is named and preserved according to the file name parameter in the data type field in the MIME section.
According to the file type of annex and/or the e-mail messages in the MIME information header to the annex that the extracts preservation of classifying.
Beneficial effect of the present invention is as follows:
When the present invention mails from mail server, can decode to the coding of annex automatically according to the MIME agreement, and decoded attachment content extracted from mail preserve, the annex that has solved in the prior art mail separates the not high problem of efficient when handling of preserving; When the annex of separating from mail is preserved, can be as required to the annex preservation of classifying, made things convenient for the management of user to annex, the user can not handled annex by Mail Clients software.
The synoptic diagram of Fig. 1 for mailing from mail server in the prior art;
Description of drawings
The synoptic diagram that Fig. 2 mails from mail server for the present invention;
Fig. 3 separates the process flow diagram of preservation to Email attachment for the present invention.
Embodiment
As shown in Figure 2, the method of the invention at client software when mail server mails, according to MIME (Multipurpose Internet Mail Extensions, multipurpose internet mail expands fair agreement) agreement decodes to the coding of annex, and decoded attachment content extracted from mail preserve.
The MIME agreement permits having carried out towards the Internet email of text expanding on the basis of RFC822 agreement, so that can comprise the scale-of-two annex in mail.The MIME mail is based on an expansion of RFC822 mail, in a mail that meets the MIME agreement, the various piece of mail is the MIME section, every segment prefix is with a special head, the MIME head is according to the position in mail package, be divided into MIME information header and MIME paragraph header substantially, the MIME information header refers to the head of whole mail, and the MIME paragraph header refers to the head of each MIME section.
Field contents in the MIME information header of mail is used to show the essential information of this mail, and as sender information, date, mail title etc., the content of the MIME paragraph header of mail is used to show type, coded system of the text of mail and annex etc.Therefore can determine title, type and the coded system of annex by the field contents in the pairing MIME section of annex in the analysis mail, extract after the encoded content of annex is decoded and preserve, can realize separating from mail and annex.
As shown in Figure 3, it is as follows Email attachment to be separated the step of preservation:
Step S10, judge whether mail meets the MIME agreement, if execution in step S11 if not, finishes;
Mail from mail server, judge in the mail coding whether have MIME-Version (MIME version number) field, this field is represented the version number of the MIME agreement that mail adopts, be generally 1.0, if the coded format of mail is the MIME form, execution in step S11 if not, finishes.
Step S11, judge whether have annex in the mail, if, execution in step S12, otherwise finish; Judge the MIME section that whether has (content display mode) field that has Content-Disposition in the mail coding, if have MIME section in the mail coding with Content-Disposition field, then represent this mail to have annex, execution in step S12, otherwise finish.
The Content-Disposition field is an Optional Field, is used for representing the annex display mode of mail.The content of Content-Disposition field mainly contains " inline " and " attachment " two types, wherein " inline " to represent the display mode of Email attachment be to show that " attachment " represents the display mode of Email attachment is to show as independent annex in the row.Can also attach some optional parameter in the Content-Disposition field, mainly comprise the parameter of information such as the filename that is used to represent annex, Time Created, modification time, time for reading, file size.
Step S12, judge that whether the annex in the mail is the annex that shows separately, if, execution in step S13;
Checking the content of Content-Disposition field, is the annex that shows separately, then execution in step S13 if show described annex in the content.
Step S13, the encoded content of annex is decoded;
According to the shown type of coding of Content-Transfer-Encoding (digital coding mode) field in this MIME section the encoded content of described annex is decoded.The shown coded system of Content-Transfer-Encoding field is generally 7 encoding schemes, 8 encoding schemes, binary coding scheme, printable character encoding scheme, base64 encoding scheme, a kind of in the x-uuenconde encoding scheme.
Step S14, from mail, extract decoded attachment content and preserve.
From mail, extract decoded attachment content, represent the pairing file type of Filename parameter of attachment files name information that the annex that extracts is named according to being used in the Content-Dispositon field, the extension name of the annex that promptly extracts should be identical with the file extension in the Content-Disposition field.If in the Content-Dispositon field the Filename parameter do not exist, also can utilize the pairing file type of Name parameter in the Content-Type field that the annex that extracts is named.
After the annex that extracts named, tackling this annex preserves, for easy-to-look-up and processing later on, can be saved in similar annex in the corresponding catalogue, the standard of classification can be determined according to actual needs flexibly, both can classify to annex, and also can classify to the annex of mail, or combination is classified to annex according to the two according to the extension name of annex according to the e-mail messages in the MIME information header of mail.
The detailed process of detached accessories from mail is described below by an embodiment.
The complete encoded content of a mail is as follows:
Date:Mon,20?Jun?2005?23:24:00+0800
From:″Alex″<alex@bodaworld.com>
Reply-To:alex@bodaworld.com
To:″Alex″<Alex@tencent.com>
Subject:=?gb2312?B?w8DOxLmyz+0=?=
Organization:Boda
X-mailer:Foxmail?5.0[cn]
Mime-Version:1.0
Content-Type:multipart/mixed;
boundary=″=====001_Dragon227621431460_=====″
This?is?a?multi-part?message?in?MIME?format.
--=====001_Dragon22762?1?43?1?460_=====
Content-Type:text/plain;
charset=″gb2312″
Content-Transfer-Encoding:base64
QWxleKOsxPq6w6OhDQoNCgkNCg0KoaGhoaGhoaGhoaGhoaGhodbCDQrA8aOhDQogCQkJCQ0KDQqh
oaGhoaGhoaGhoaGhoaGhQWxleA0KoaGhoaGhoaGhoaGhoaGhoWFsZXhAYm9kYXdvcmxkLmNvbQ0K
oaGhoaGhoaGhoaGhoaGhoaGhoaEyMDA1LTA2LTIwDQo=
--=====001_Dragon227621431460_=====
Content-Type:application/octet-stream;
name=″GoodText.txt″
Content-Transfer-Encoding:base64
Content-Disposition:attachment;
filename=″GoodText.txt″
SGVsbG8gRm94bWFpbCAh
--=====001_Dragon227621431460_=====--
Owing to have the MIME-Version field in the coding of this mail, therefore can determine that the coded format of mail is the MIME form; Have the Content-Disposition field in last MIME section of mail, represent mail to have an annex, and the content of Content-Disposition field is attachment, represent the annex of this annex for showing separately; Can determine that according to the Content-Transfer-Encoding field in this MIME section the coded system that annex adopts is base64, adopt corresponding decoding process that annex encoded content " SGVsbG8gRm94bWFpbCAh " is decoded, with decoded attachment content " HelloFoxmail extracts from mail; " GoodText.txt " names the annex that extracts according to the file name information in the Content-Disposition field; require the extension name of this annex should be identical with the file extension in the Content-Disposition field; promptly the filename of this annex should be " * .txt ", according to this extension name to the annex preservation of classifying.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (7)

1. the method for a separate keeping mail appendix is characterized in that, comprises step:
A, mail, judge whether the coded format of this mail is the MIME form, if execution in step B1 if not, finishes from mail server;
B1, judge in the mail coding whether have MIME section with content display mode field, if then this mail has annex, execution in step B2, otherwise, finish;
The content of B2, viewing content display mode field, if showing described annex in the content of content display mode field be the annex of demonstration separately, then the annex encoded content is decoded and preserve according to the shown type of coding of digital coding mode field in the described MIME section.
2. the method for separate keeping mail appendix as claimed in claim 1 is characterized in that, in the described steps A, judges according to whether having the MIME version number field in the mail coding whether the coded format of mail is the MIME form.
3. the method for separate keeping mail appendix as claimed in claim 1 is characterized in that, extracts decoded attachment content from mail, the annex that extracts is named and is preserved according to the file name parameter in the content display mode field in the MIME section.
4. the method for separate keeping mail appendix as claimed in claim 3 is characterized in that, the annex that extracts is named and when preserving, and the shown file type of its file type and the file name parameter in the content display mode field is identical.
5. the method for separate keeping mail appendix as claimed in claim 3, it is characterized in that, if do not have file name parameter in the described content display mode field, then the annex that extracts is named and preserved according to the file name parameter in the data type field in the MIME section.
6. the method for separate keeping mail appendix as claimed in claim 5 is characterized in that, the annex that extracts is named and when preserving, and the shown file type of its file type and the file name parameter in the data type field is identical.
7. as the method for any described separate keeping mail appendix in the claim 3 to 6, it is characterized in that, according to the file type of annex and/or the e-mail messages in the MIME information header to the annex that the extracts preservation of classifying.
CN2005100802569A 2005-06-30 2005-06-30 Method for separately keeping mail appendix Active CN1889106B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2005100802569A CN1889106B (en) 2005-06-30 2005-06-30 Method for separately keeping mail appendix

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2005100802569A CN1889106B (en) 2005-06-30 2005-06-30 Method for separately keeping mail appendix

Publications (2)

Publication Number Publication Date
CN1889106A CN1889106A (en) 2007-01-03
CN1889106B true CN1889106B (en) 2011-04-06

Family

ID=37578382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2005100802569A Active CN1889106B (en) 2005-06-30 2005-06-30 Method for separately keeping mail appendix

Country Status (1)

Country Link
CN (1) CN1889106B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2218242B1 (en) * 2007-10-27 2019-09-11 BlackBerry Limited Content disposition system and method for processing message content in a distributed environment
JP4852638B2 (en) * 2009-09-28 2012-01-11 株式会社沖データ Mail management apparatus, composite apparatus, and communication method
CN102075449A (en) * 2009-11-25 2011-05-25 联想(北京)有限公司 Method, device and terminal equipment for managing E-mails
CN102333121B (en) * 2011-09-30 2014-03-12 华为软件技术有限公司 Method for sending and receiving HTTP (Hyper Text Transfer Protocol) attachment as well as server and terminal equipment
CN103248553A (en) * 2012-02-07 2013-08-14 腾讯科技(深圳)有限公司 Mail encryption method, mail decryption method and clients
CN104935503A (en) * 2015-06-17 2015-09-23 世纪龙信息网络有限责任公司 Mail storage method and system, and mail display method and system
CN108768835B (en) * 2018-05-30 2022-03-18 彩讯科技股份有限公司 Mail analysis method, device, server and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1276569A (en) * 1999-06-04 2000-12-13 国际商业机器公司 Network mail transmission agent with automatic file appendage memory
CN1466342A (en) * 2002-07-02 2004-01-07 深圳市中兴通讯股份有限公司 Method for reducing e-mail content in gateway

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1276569A (en) * 1999-06-04 2000-12-13 国际商业机器公司 Network mail transmission agent with automatic file appendage memory
CN1466342A (en) * 2002-07-02 2004-01-07 深圳市中兴通讯股份有限公司 Method for reducing e-mail content in gateway

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CN 1466342 A,说明书第3页.

Also Published As

Publication number Publication date
CN1889106A (en) 2007-01-03

Similar Documents

Publication Publication Date Title
CN1889106B (en) Method for separately keeping mail appendix
US11568368B2 (en) Classification engine instance informing parsing of emails received by an email client instance executed by a mobile device
US6823368B1 (en) Method and system for E-mail sender chain history by adding a sender-chain filed to the E-mail header when forwarding a chain forwarded E-mail message to another recipient
CN101079827B (en) Email management method and system
US20070106736A1 (en) Variable and customizable email attachments and content
US9894020B2 (en) Delivery of email messages with repetitive attachments
CN103595615B (en) The method of sending and receiving of Email, terminal
US20050289149A1 (en) Method and system for processing a file attached to an electronic document
WO2005013035A3 (en) Method, system, and program product for automatically formatting electronic mail
US20100325227A1 (en) Systems and methods for composite data message
WO2005010692A3 (en) System and method for identifying and filtering junk e-mail messages or spam based on url content
WO2006036285A3 (en) Methods and system for creating and sending electronic mail having multi-media files
WO2005124576B1 (en) Communicating information about the content of electronic messages to a server
TW200620911A (en) Dividing method and receiving method for normal mails and commercial mails in e-mail
Wood Programming Internet Email: Mastering Internet Messaging Systems
US7979500B2 (en) Email composition and processing
CN103532828B (en) A kind of rich text format of the XMPP based on extension realizes system and method
KR101729637B1 (en) Network device and method for processing email request
US20080235798A1 (en) Method for filtering junk messages
CN100433867C (en) Method and apparatus for preventing personal data losing in mobile terminal
CN101789105B (en) Packet-level dynamic mail attachment virus detection method
CN101924640A (en) Method and system for group sending of email
TW200622787A (en) Operation system and method of workflow integrated with a mail platform and web applications, and related mail platform
CN104077363B (en) Mail server and its method for carrying out mail full-text search
US8626840B2 (en) Method and system for generating a referencing secondary electronic mail message from a primary electronic mail message

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant