At 00:45 6/6/2002 +0200, Peter Lindeman wrote: > > mail server is running on - but still a lot of overhead, especially for > > MIME encoded messages (it's necessary to read the entire message to > > determine if there are file attachments, because it's necessary to see > each > > content-type entry in the message). > >You don't have to do that, you can use the "TOP" command in POP3 to >retrieve just the headers and parse them.
Yes, for the "master" content-type entry there. However, for MIME encoded mail messages, there are additional content-type entries distributed through the body. For example, one of the test messages I sent myself contains the following in the header (the "<quote>" and "</quote>" portions are used as delimiters here and do not appear in the actual header or message): <quote> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_15920718==_" </quote> Then, in the body, it contains: <quote> --=====================_15920718==_ Content-Type: text/plain; charset="us-ascii"; format=flowed --=====================_15920718==_ Content-Type: text/html; name="A Valid HTML File Name.htm" Content-Transfer-Encoding: x-uuencode Content-Disposition: attachment; filename="A Valid HTML File Name.htm" </quote> It is entirely possible to have dozens of these content type blocks scattered through the body of an e-mail. And without parsing them, it's not possible to tell if the content in the mail is simply text and HTML, or if there's a real attachment, or whatever else might be there... Tracy - To unsubscribe from this list: send the line "unsubscribe xmail" in the body of a message to [EMAIL PROTECTED] For general help: send the line "help" in the body of a message to [EMAIL PROTECTED]
