🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.ip.developers
Article #970

unread mail

#970
From: John de Rivaz
Date: Fri, 05 Jul 1996 00:00
35 lines
2034 bytes
The DOS package with Demon has a feature that lists each of your 
mailboxes and show how many unread messages are present. Does anyone now 
how this works? I tried to write a little application in Visual Basic to 
do the same, and variations in mail headers always seem to fool it.

I opened each *.txt file of email and read it line by line as follows:

      Input #1, a$
      If Left$(a$, 11) = "Message-Id:" Then validated = 0
      If Left$(a$, 13) = "Content-Type:" And validated = 0 Then
         validated = 1: c = c + 1
      end if
      If Left$(a$, 9) = "Status: R" And validated Then
        c = c - 1: validated=0
      End If

c is the count of unread messages. It is incremented each time a message 
is validated and decremented again if it has been read as flagged by the 
NewsWin Status insertion.
 
Maybe I am doing something stupid, but I can be attempting the 
impossible as the DOS package already does it.

-- 
Sincerely,     ****************************************
               * Publisher of        Longevity Report *
John de Rivaz  *                     Fractal Report   *
               *          details on request          *
               ****************************************
    In the information age, sharing can increase world
    wealth enormously, because giving information does
              not decrease your information.
     http://ourworld.compuserve.com/homepages/JohndeR                   
           Fast loading, very few slow pictures
Technical Details
Message-ID: <303048688wnr@longevb.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bb05,74043d7991f5707b,start
X-Google-Attributes: gid10bb05,public
From: John de Rivaz <John@longevb.demon.co.uk>
Subject: unread mail
Date: 1996/07/05
Message-ID: <303048688wnr@longevb.demon.co.uk>
X-Deja-AN: 163826945
x-mail2news-path: relay-4.mail.demon.net!post.demon.co.uk!longevb.demon.co.uk
x-nntp-posting-host: longevb.demon.co.uk
organization: Myorganisation
reply-to: John@longevb.demon.co.uk
newsgroups: demon.ip.developers