On Tue, 24 Sep 2002 11:19:13 +0200 (CEST), tomas pospisek wrote:
> Is there a specific reason appending to an open stream will automatically
> mark the appenden messages "Status: O"?

If the stream is open on the mailbox being appended to, then when you append
to that mailbox, the open stream will see the new message.  The open stream
will call the new message \Recent, and set "Status: O" in the file for
subsequent streams.

On Tue, 24 Sep 2002 12:10:32 +0200 (CEST), tomas pospisek wrote:
> Let me see, if I understand this right. mail_append_full has the following
> syntax:
> long mail_append_full (MAILSTREAM *stream,char *mailbox,char *flags,
>                        char *date, STRING *message);
> Are you saying that I should be appending to a _closed_ stream?

You can append to a null stream, or to a stream open on another mailbox.  Note
that a closed stream (mail_close() called on it) is no longer valid and has
been free()d.

In general, you only should provide a non-null stream if you are using IMAP,
and already have a stream open to the IMAP server for the APPEND destination
mailbox.  In that case, c-client will use that stream instead of making a
temporary stream.

The other reason to provide a non-null stream is for setting local formats,
but that's a power tool.

> Btw - I note that pine apparently falls into the same pithole as me, since
> if I write a message to myself from within pine it gets "Status: O",
> even before I even see it in the index.

I just tested it in Pine.  I saved a message to a new mailbox.  It did not get
the "Status: O" flag.

Reply via email to