==============================================================================
  Oct'03 v2.2  (c) Heimo Claasen REVOBILD  35 Rue du Marteau  B-1000 BRUXELLES
 ==============================================================================

 This is a short guide to setup Marc Ressl's NETMAIL FOR DOS with Revobild's
 pre- and post-prossessors Mail-to-Netmail (M2NM) and NM-to-Mailbag (NM2BAG):

 Netmail is run after a dial-in connection was established and a packet
 driver has been loaded.

 NETMAIL has its own manual and its specific configuration utility,
 NMSETUP.exe - use this to configure Netmail accordingly for the servers to
 use for sending (SMTP) and fetchin mail (POP3).

 "Netmail /send" needs an outgoing (sub)directory for each sendmail ISP/SMTP
 to be used (this is to enter into Netmail's NMsetup); it creates a pair of
 mail files with the extension *.TXT and *.WRK, respectively, with the "From:"
 eMail address to use in the mail, and the destination(s) (several if there is
 a /CC or a destination list).  M2NM creates this pair of files from the
 original, edited mail-item file, which in turn just needs the destination in
 its first line, the subject in its second line, and then one empty line
 before any body/text starts.

 "Netmail /receive" will store all mails fetched as a pair of single
 files - starting with 00000000.TXT and 00000000.WRK - in the (sub)directory
 for incoming mail defined in its setup. NM2BAG discards of the *.WRK
 files which are normally not used for offline readers in DOS, and puts
 all *.TXT files into a folder which corresponds to the stream of incoming
 "raw" mail items from the POP3 server separated by the standard "dot-line"
 (CR LF . CR LF) which signals the end of a specific mail. (NM2BAG changes
 "lost single dots on a line" inside any mail to a standard double dot
 so that offline readers are not confused.)

 With just one mailbox in use the setup is straightforward:
 - run "M2NM m2nm.cfg [switches]" to put the *.TXT and *.WRK files
   from the original edited mails into the outgoing (sub)directory
 - run the dialler (Chat), then load the packet driver (LSppp)
 - run "Netmail /send" if you have outgoing mail
 - run "netmail /receive" to fetch mail from a POP3 account
 - unload the packet driver and close the telco line
 - run "NM2BAG   [switches]" to put
   the mails into a folder
 - run ReRead (or any other offline reader using the standard "raw"
   mail stream, like Nettamer or Nescape Mail) to read, order, reply to,
   or trash the mails.

 You can easily set this up in one DOS batch file. Certainly it's useful
 to put in stops/switches there - "Holdit.com" is a practical small tool
 for this - if you just need to send-off mail, or only want to fetch mail.
 If a mail to send has not gone out (e.g., because of a typo in an
 address) it stays in the outgoing (sub)directory; otherwise, Netmail
 deletes these pairs of *.txt/*.wrk files there. I have a check in my
 batch to look for left-over *.txt files there - and a break-out switch
 at this point too -, before the batch deletes the original files too
 (and a copy of it has gone into the sent-off folder.)

 The following describes some steps for sending off mail with just one
 dial-up connection from multiple own (apparent) mail addresses, and to
 fetch mail from any number of mailboxes, in just one dial-up go:

 SENDING: This would use the Netmail /send configuration NM.CFG with the
 right entry for the SMTP to use (almost certainly the one available at
 the dial-in Net Access/Service provider), but different configurations for
 the "preprocessor" M2NM - Netmail uses the entries in the "*.WRK" files
 ("OUT-nnnn.WRK") to write the 'apparently-from' "From:"-address into the
 mail header finally to send off - i.e. that which is visible for the
 receiver (e.g., and importantly, for a name-checking mailing lists), but
 negotiates (and sends) through this SMTP server with the "real" address.
 i.e. the one which is checked/authenticated with dialling-in/PPP negotiation.

 Thus if you want to write from different addresses (i.e. the names of
 your different mailboxes) you need (a) different M2NM-"configs", and
 (b) different original-mail filename templates, i.e., those looked for
 by M2NM according to the template given in the first line of M2NM-xyz.CFG
 (or "ISP-1.ini" or whatever you name it; the config-filename which
 must appear as a command line argument with M2NM.) Please take a look at
 the doc and the notes on then configuration/"ini" file in M2NM-CFG.TXT.

 You can have the series of mails with different "apparently-From:"
 worked out in one stretch, before going online _if_ all are to be sent
 via a same SMTP server.  M2NM checks for the upnumbered out-files in
 the outgoing-mail subdir; but it's reasonably fast - if those mails are
 not tens of megabytes... - to do this online after dialling-in too.

 FETCHING mails from different boxes: Here, it's Netmail's Config which
 must be different, as each time it has to talk to different POP3
 addresses with their different passwords. The mails dowloaded from
 different boxes must go into different (sub)directories too - the
 respective entries are needed in the pertinent NM.CFGs likewise -
 as Netmail is a bit rigid in its output, starting always with a file
 pair of "00000000.TXT|WRK" and thus would overwrite gracelessly what's
 left with such numbered earlier downloads..
 Thus you have (a batch) to do, respectively,
 (1.) to copy the specific NM-POPxx.CFG's over onto a "NM.CFG" to use, and
 (2.) to call "Netmail /receive" for the respective POP3 you want to check.

 The "postprocessor" NM2BAG then puts the single-item *.TXT files, with
 adding a "dot-line" end-of-item marker, from an incoming (sub)dir into a
 folder or mailbag in the format like the one used by Nettamer ("*.DLU");
 default is a filename of four letters given and the MMDD daystamp,
 and a running number as extension - e.g, "mailMMDD.1"; but it can get whatever
  you want. It then simply deletes the *.wrk files which are
 useless further (except in an unixish setup like uka_ppp or Yan; but there
 you need no "postprocessing" as the offline readers work with those single-
 item files [and maybe _huge_ numbers of them in the subdirs].)

 Mails are always appended to the folder-file, so you can assemble all in one
 continuously used "inmail"-folder, or in different ones depending on the
 POP3-source. (The built-in default naming with the date-stamp is
 simply to override with another target sepcification as argument on the
 command line for NM2BAG.)

 This sounds more complicated and verbose than it is in practice - I use
 just two very straight batches, one with the dialler + packet driver
 (CHAT and LSppp) and a check if there are mails to send off, then a
 pause/switch - I might want to stay online to do other things or/and
 then to fetch mail -, then another batch to close the line and "post-
 process" offline whatever mails there are in the Netmail-inboxes.

 This procedures seems optimal for conditions - like in Europa or worse
 elsewhere - where each dial-in already costs a forfeit for telco fees,
 and where online time then is metered.

 The "post-processor" NM2BAGS since v.2+ has a built-in character
 remapping which is ON by default, and translates Windoze 8bit chars to
 the IBM/CP437/PC8-charset, _IF_ it finds a line with the keywords
 "Content-Type:...; charset=8859-1" in an incoming nnnnnnnn.TXT mail's
 header, and _IF_ the joined "Eurowin$.lst" (this name is hardwired as
 a default, any other name can be used) is present in the directory (from)
 where it is run. If that charlist is not there, it does nothing of that.

 This remapping can be switched off, when the char list is present, with
 a command line switch, "/-c" with NM2BAG (note the syntax ! different
 from the enabling/forcing switch for a remapping list, "/c-".
 Since v.20, even M2NM can use this list to ENcode outgoing mails with
 another list of selected characters to remap.
 There is some detailed commentary in the joined "Eurowin$.LST" file.

 Attention - A PROBLEM WITH NETMAIL FETCHING MAILS however is caused by some
 decidedly standards-sabotaging mail gear from Microsoft: it often creates
 mail text endlessly surpassing the limits for unbroken line length required
 in the standards/RFCs. M.Ressl's NETMAIL regrettably chokes when receiving
 such malformatted mess (which is conspicuously frequent in SPAM.) As the
 author hadn't found the time yet to implement a solution, we have developed
 an alternative FETCH mail functionality using NETBAS and a fetchmail script
 for this, AUTOPOP. This can replace the NETMAIL routines in a same batch
 setup used for NETMAIL (and somewhats simplifies things as it saves the
 downloded stream of mails from one account directly in just one folder and
 thus shortens post-processing.)
 Please look for the NBASAUTO package at the Revobild website !

 ============================================================================
     Heimo Claasen   /   REVOBILD                
                35 Rue du Marteau B-1000 BRUXELLES t. (+32) 02 217 86 07
     HomePage of ReRead - and much to read  ==>  http://www.revobild.net
 ============================================================================

 (c) COPYRIGHT NOTE:

 The programs, "M2NM.exe" and "NM2BAG.exe" in all their versions - and since
 v.2+ including the joined "eurowin$.lst" file - is free for individual and
 non-commercial use.

 "Commercial" would mean either the use as a business tool set up in any
 organisational context by that organisation's administrator or on his or
 anyone else's instigation for use of any member of that (business or other)
 organisation.
 (Thus singular, personal use inside an "organistion" does not fall into this
 category.)

 "Commercial" would mean too any distribution of the program and all joined or
 connected material which would demand any compensation above the sheer - and
 to be _PROVEN_ ! - costs of reproduction.

 The program source, subject to the same conditions, is available upon simple
 request from the author.

 The program(-packages) contains all basic information as to the use of it, in
 its functionality described there.

 The program sources and the explicative notes are the author's TEXT files
 subject to legal (c) COPYRIGHT rules and can be obtained from REVOBILD against
 a honorary fee (not subject to wares taxes/VAT e.a.)
 At present, the fee is set to:

 Individual (one-by-one) reproduction & use        ....EUR (=USD)    5:-
 -- including program support via eMail -

 Multiple reprint (print or ANY other distribution)....EUR (=USD)  350:-
 -- if not higher organisational tariffs are applicable -

 VISA/MASTER card payment accepted (see below)

 ============================================================================
     Heimo Claasen   /   REVOBILD                
                35 Rue du Marteau B-1000 BRUXELLES t. (+32) 02 217 86 07
     HomePage of ReRead - and much to read  ==>  http://www.revobild.net
 ============================================================================

 Order Form - print/cut out, or write including all details,
              and send by ORDINARY MAIL (do *not* email card specifics !)
              (Please specify: ...... such)
                               ^^^^^^
 ----------------------------------------------------------------------------

 To
 Heimo Claasen / Revobild
 35, Rue du Marteau
 B - 1000 BRUXELLES

 I herewith order a reproduction/reprint right granted for:
 "NM2BAG.TXT", "M2NM.TXT", and "MAIL_HOW.TO"
 from Heimo Claasen (Revobild), Brussels

 for: individual / manifold  reprinting.
      ^^^^^^^^^^   ^^^^^^^^

 The fee of EUR / USD   5:-  / .......
            ^^^   ^^^   ^^^^   ^^^^^^^
 is to be charged on: my(*) / VISA / MASTER card account:
                      ^^^^^   ^^^^   ^^^^^^

 No. ......../......../......../........

 Expir. Date: ......../........

 Prename, Family Name (block letters)(*): .....................

 Date: ......../......../........


 Signature(*): ...................

 Postal Address:     ......................
 and (or at least)
 eMail address       ......................
 (please: legible !)
                     ......................

 (*) If card holders's name if different from orderer's, his/her
     (or authorized person's) name and signature are to be supplied too.

 ============================================================================
/