Article View: demon.ip.developers
Article #892Re: unread mail
From: John Washington
Date: Mon, 15 Jul 1996 00:00
Date: Mon, 15 Jul 1996 00:00
37 lines
2123 bytes
2123 bytes
On 5 Jul, in article <31dd2477.0@muir-et2.staff.demon.net>
malcolm@demon.net "Malcolm Muir" wrote:
MM> John de Rivaz (John@longevb.demon.co.uk) wrote:
MM> > The DOS package with Demon has a feature that lists each of your
MM> > mailboxes and show how many unread messages are present. Does anyone now
MM> > how this works? I tried to write a little application in Visual Basic to
..
MM> You are counting messages the wrong way. Each new message in a
MM> mailbox starts with the line 'From ' (note there is no ':')
MM>
MM> Count the number of 'From ' lines and the number of 'Status: R'
MM> lines. Subtract one from the other.
The 2nd part of that sounds over-simplistic to me. If you have
Status: R lines within the body of your mail...
I don't use those lines anyway, but if I did then I'd be inclined
to use the From logic to detect the start of a header, keep an
eye out for Status lines within the header, then use the double
newline to detect the start of the body (within which I would look
for nothing except the start of the next header).
Incidentally, at least one posting within this thread seemed to
confuse the terms 'newline' and 'blank line'. IMHO, to get what
we informally refer to as a blank line, you need two consecutive
newline characters. A single newline character preceding a 'From '
is (I imagine) not sufficient to signal the start of a header.
Sorry about the long delay following up. I've discovered
Life With No Internet. It's incredibly addictive. I thought
I could handle it, tried a couple of days of it, and ...
That was three weeks ago.
--
John Washington
Technical Details
Message-ID:
<837432741snz@wash.demon.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<303048688wnr@longevb.demon.co.uk> <31dd2477.0@muir-et2.staff.demon.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10bb05,74043d7991f5707b X-Google-Attributes: gid10bb05,public From: John Washington <john@wash.demon.co.uk> Subject: Re: unread mail Date: 1996/07/15 Message-ID: <837432741snz@wash.demon.co.uk> X-Deja-AN: 168441074 x-mail2news-path: wash.demon.co.uk x-nntp-posting-host: wash.demon.co.uk references: <303048688wnr@longevb.demon.co.uk> <31dd2477.0@muir-et2.staff.demon.net> newsgroups: demon.ip.developers