Subject: Help in driver programme...

From: [email-masked] (Tejinderpal Singh)
Date: Tue, 12 May 1998 14:01:23 +0800 (SGT)

Hi ,

   I am trying to write a driver for the imap server using the c-client
functions.

   First => I found that an error in Internal.DOC . In this document 
the net_open function takes in three arguments, whereas I did a 
search on c-client files and found that it should be taking four
arguments.

  Next=> I tried to do a search on the first argument which is supposed 
to be "NETDRIVER" and could not find anything in the Internal.DOC file.

  I still don't know What NETDRIVER is ..?

Below is the driver that I am trying to do. So far I am just trying
to establish a connection with the imap server and then passing user id
and password.

By the way, How (What) function do I use to pass the userid and password
to the imap server. I am really having a hard time finding what 
function to use. ??? I will be very grateful if anyone can solve my 
problems.

=====
The following is what I have started so far :
#include <stdio.h>
#include <ctype.h>
#include <signal.h>
#include "mail.h"
#include "osdep.h"
#include "rfc822.h"
#include "smtp.h"
#include "nntp.h"

main()
{
NETSTREAM *netstream;
unsigned long portnum=143;
char *hostname= "mailhost";
char *service="IMAP4";

printf("\nThis program is beginning\n");
netstream=net_open(hostname,service,portnum);

net_close(netstream);
}

====

I would really appreciate any help. 

Thanks

Tajinder

---

From: Mark Crispin <[email-masked]>
Date: Tue, 12 May 1998 09:09:16 -0700 (PDT)

The Internal.DOC file describes an older version (imap-4) of the IMAP toolkit,
from August 1996.  The current version is imap-4.1.  About 95% of Internal.DOC
is still good information, but you need to look at the source code (in
particular, mail.h and mail.c) to see the current interfaces.

A NETDRIVER is a function dispatch vector for I/O on a particular network
technology.  This permits you to substitute your own network I/O technology.
For example, Pine wants to insert its own I/O routines so it can do on-the-fly
generation of attachments.  c-client has a TCP NETDRIVER built-in; this will
be used if you use a NIL argument for the NETDRIVER.  So, unless you need a
special NETDRIVER, this argument should always be NIL.

If you wish to open an IMAP session, net_open() is the wrong function.  This
will just give you a NETSTREAM on a network connection.  The function you want
to use is mail_open().