Subject: Re: mailbox format

From: [email-masked]
Date: Thu, 14 Jun 2001 11:21:56 -0700

Hi Mark,

I tried including the linkage.h file in my test program and ran it.
I still get the same error.

Here is my program
---------------------------------------------------------------------------
-------------------------------------------
#include <stdio.h>
#include <stdlib.h>

extern "C" {
#include "mail.h"
#include "/vob/adcsj/3prty/cclient/c-client/linkage.h"
#include "rfc822.h"
#include "misc.h"
#include "env.h"
#include "fs.h"
#include "nl.h"
#include "pop3.h"
#include "ftl.h"
}

int main()
{
   MAILSTREAM*    stream;
   char           user[10], mailbox[30];
   int j;

   sprintf(mailbox, "{%s/%s}","bilbo.centigram.com","pop3");
// strcat(mailbox, "INBOX");

   stream = mail_open(NIL, mailbox, OP_DEBUG);
   if(!stream)
   {
      printf("pop3 session open failed for %s\n\r", mailbox) ;
      return(0);
   }

   printf("pop3 session opened for %s\n\r", mailbox) ;

   mail_close(stream);

}
---------------------------------------------------------------------------
-------------------------------------------------------

Here is the error message

[ccLog] ?Can't open mailbox {bilbo.centigram.com/pop3}: invalid remote
specification
pop3 session open failed for {bilbo.centigram.com/pop3}

---------------------------------------------------------------------------
-----------------------------------------------------------

I tried debugging the program. It seems that the factory is being assigned
to maildrivers in
mail_valid function which is being called from mail_open. But the
maildrivers itself is NIL.

Regards,
Manjula

|--------+------------------------>
|        |          Mark Crispin  |
|        |          <[email-masked]|
|        |          ngton.EDU>    |
|        |                        |
|        |          06/13/2001    |
|        |          08:27 PM      |
|        |                        |
|--------+------------------------>
  >------------------------------------------------|
  |                                                |
  |       To:     [email-masked]         |
  |       cc:     [email-masked],     |
  |       (bcc: Manjula Hullatti/US/Centigram)     |
  |       Subject:     Re: mailbox format          |
  >------------------------------------------------|

On Mon, 11 Jun 2001 [email-masked] wrote:
> What is the format of mailbox string passed while doing mail_open ?
> I tried giving it as {bilbo.centigram.com:110}INBOX and I'm getting an
> error
> [ccLog] ?Can't open mailbox {bilbo.centigram.com:110}INBOX: invalid
remote
> specification

Did you "#include <linkage.c>" in your main program?  I bet that you
did not.  Nothing will work unless you include the linkage!

In any case, that specification won't work since it will try to open an
IMAP connection on the POP3 port.  You need "/pop3" instead of ":110".

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.

---

From: Hollis <[email-masked]>
Date: Thu, 14 Jun 2001 14:20:31 -0400

(My previous message to the list bounced.)

> I still get the same error.

It's the .c file that's the important part.

> Here is my program
^^ delete that

> // strcat(mailbox, "INBOX");

(Insert:)
/********* include a .c file... **********/
#include "c-client/linkage.c"
/*****************************************/

(Now you can mail_open just about anything.)

>    printf("pop3 session opened for %s\n\r", mailbox) ;

-Hollis