Home > Software engineering >  Make a general read E-mail software available?
Make a general read E-mail software available?

Time:11-03

I now are trying to do such a thing, the purpose can be read automatically when you open computer networking unread mail, remind users and can directly use the analytical module of mail software, user to ignore some important mail,

Has the function of the complete:
(1) to two BASE64 coding way of MIME protocol and Quoted - email correctly parse Printable encoding (including text and accessories), has been through multiple email validation email;
(2) correctly separated mail head and mail content;
Other minor don't say,

Currently in need of improvement function:
(1) some properties of header can't correctly segmented, for example: some of the mail Subject, the content-type attribute values may be more than one line, so if the newline character as the attribute value of the end of the Peugeot is incomplete; So I naturally thought of at least a newline and colon as the end of the Peugeot, then remove the last line breaks, but now are not sure this kind of idea, because the attribute value of both the newline character at the same time also appeared a colon? (don't know if this is possible, because the general Subject are encoded, colon won't appear). Then I thought of a judgment method, it is verified whether there after a newline standard MIME protocol specified in the attribute names, such as general will appear From behind To wait, as long as before after a property name specified in the standard protocol of any of the attribute name, attribute values over, at first I thought the idea should be on the safe side, it is found that not all POP server is completely in accordance with the MIME protocol standard, usually accompanied by server's own attribute names, just I care about a few attributes From one thousand, To the Subject, the content-type in the back with a no agreed property names in my software, that is indeed, I am understanding the MIME protocol is not very clear, not the online information, so I'm not sure whether E-mail in accordance with the MIME protocol header in addition To the Date attribute, the rest of the attributes of the attribute values are not allowed To appear colon directly, otherwise need To encode the operation, so that we can make sure it won't appear parse the accident, this is one of my guess, at present has not been overturned, but don't know whether the actual situation is so? So please have research on the warrior to take a bubble under discussion!
(2) the transformation between different character sets, I am using VB6.0 by use of development environment, a little behind The Times, ha ha, so what transcoding StrConv all use this function, there have been no what seems can not display the characters (my contact email character set GBK and GB18030 only two at present, temporarily haven't met the other), but always feel wrong character set is analyzed some inappropriate, but couldn't find a good solution, hope masters glad to you!

Has yet to complete function:
To the E-mail content, automatically segmented reasonably, ensure to reasonably separated from the body of the email and attachments (currently points by hand), but the idea is to solve the yes, that's according to the -=and - the two key tag with regular expressions or to directly compare the ASCII coding to realize the automatic segmentation, the main difficulty is to pay attention to handle the segmentation tags nested problem and algorithm efficiency, with regular feels as though it is not very good, also because I actually use of regular expression level is less than the home), so the preliminary consideration or more ASCII coding way,
Some other humanized design, good at present the reasons, first to solve the main problems of the above,

There is a most critical problem, if there is any meaning to do such a thing? Or if someone has done such a thing (of course as a programming exercise level is ok)? In addition, as the article title says, make such a thing can do a generality, namely the root specific mailbox server has nothing to do, so long as is based on the MIME protocol? Any problem, as long as you want to own opinions, are welcome to discuss, to guide the younger brother, thank you very much!

CodePudding user response:

Directly to do secondary development Outlook, Google MAPI,

CodePudding user response:

Thank you for let me know there is such a programming interface, the problem is that if the other party machines no Outlook or simply want to install Outlook? Then there is this MAPI is Microsoft's standard, is a representative sample? I actually thought about this question went up from the MIME protocol, so it is best to direct information related to the agreement, thank you!

CodePudding user response:

MIME is not a deal, just a format, brother,

CodePudding user response:

Can be said to be the format, also can saying is agreement, not contradictory, side key differs only just.
Baidu results: Multipurpose Internet Mail extension protocol (MIME) is a Multipurpose Internet Mail Extensions, illustrates how to arrange the message format to make messages exchanged in different Mail system, MIME format is flexible, allowing email contains any type of document, MIME messages can contain text, images, voice, video and other application specific data,

And parse the end of the above problem has been solved, now the main problem is the character set conversion issues, I found the encoding for GB2312, GBK, use of GB18030 StrConv converted can display normally, but not utf-8, need their transcoding, is currently studying this problem,

CodePudding user response:

You can refer to: http://blog.csdn.net/chenjl1031/article/details/6059767

CodePudding user response:

Well, thank you! What I need,

CodePudding user response:

refer to the original poster TJ12580 response:
I now trying to do such a thing, the purpose can be read automatically when you open computer networking unread mail, warn the user and can directly use the analytical module of mail software, user to ignore some important mail,

Has the function of the complete:
(1) to two BASE64 coding way of MIME protocol and Quoted - email correctly parse Printable encoding (including text and accessories), has been through multiple email validation email;
(2) correctly separated mail head and mail content;
Other minor don't say,

Currently in need of improvement function:
(1) some properties of header can't correctly segmented, for example: some of the mail Subject, the content-type attribute values may be more than one line, so if the newline character as the attribute value of the end of the Peugeot is incomplete; So I naturally thought of at least a newline and colon as the end of the Peugeot, then remove the last line breaks, but now are not sure this kind of idea, because the attribute value of both the newline character at the same time also appeared a colon? (don't know if this is possible, because the general Subject are encoded, colon won't appear). Then I thought of a judgment method, it is verified whether there after a newline standard MIME protocol specified in the attribute names, such as general will appear From behind To wait, as long as before after a property name specified in the standard protocol of any of the attribute name, attribute values over, at first I thought the idea should be on the safe side, it is found that not all POP server is completely in accordance with the MIME protocol standard, usually accompanied by server's own attribute names, just I care about a few attributes From one thousand, To the Subject, the content-type in the back with a no agreed property names in my software, that is indeed, I am understanding the MIME protocol is not very clear, not the online information, so I'm not sure whether E-mail in accordance with the MIME protocol header in addition To the Date attribute, the rest of the attributes of the attribute values are not allowed To appear colon directly, otherwise need To encode the operation, so that we can make sure it won't appear parse the accident, this is one of my guess, at present has not been overturned, but don't know whether the actual situation is so? So please have research on the warrior to take a bubble under discussion!
(2) the transformation between different character sets, I am using VB6.0 by use of development environment, a little behind The Times, ha ha, so what transcoding StrConv all use this function, there have been no what seems can not display the characters (my contact email character set GBK and GB18030 only two at present, temporarily haven't met the other), but always feel wrong character set is analyzed some inappropriate, but couldn't find a good solution, hope masters glad to you!

Has yet to complete function:
To the E-mail content, automatically segmented reasonably, ensure to reasonably separated from the body of the email and attachments (currently points by hand), but the idea is to solve the yes, that's according to the -=and - the two key tag with regular expressions or to directly compare the ASCII coding to realize the automatic segmentation, the main difficulty is to pay attention to handle the segmentation tags nested problem and algorithm efficiency, with regular feels as though it is not very good, also because I actually use of regular expression level is less than the home), so the preliminary consideration or more ASCII coding way,
Some other humanized design, good at present the reasons, first to solve the main problems of the above,

There is a most critical problem, if there is any meaning to do such a thing? Or if someone has done such a thing (of course as a programming exercise level is ok)? In addition, as the article title says, make such a thing can do a generality, namely the root specific mailbox server has nothing to do, so long as is based on the MIME protocol? Any problem, as long as you want to own opinions, are welcome to discuss, to guide the younger brother, thank you very much!


Code can share, I want to learn how to write you, [email protected] thank you

CodePudding user response:

Code is longer, a total of two class module, a responsible for decoding, a responsible for parsing the E-mail, there is a character set conversion, if you want, then I will send you see,
  • Related