Subject: mail_append

From: Mike Trank <[email-masked]>
Date: Sun, 19 Mar 2000 11:10:03 -0600 (CST)

and one other question[B

the doc says

long mail_append(MAILSTREAM *stream, char *mailbox, STRING *message)

where stream is "stream to use if non-NIL ( in the IMAP case )"

which means that if "stream" is NIL, then "mailbox" should have the
directory and path of a disk file, am I right?

what if "stream" is an already opened imap stream ( or pop3 or whatever
for that matter)? .... should "mailbox" then be NIL?

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Sun, 19 Mar 2000 12:39:32 -0800 (PST)

> directory and path of a disk file, am I right?

"mailbox" must ALWAYS have a destination mailbox name.

If the destination mailbox name is an IMAP mailbox name, then a non-NIL stream
indicates an open IMAP stream that will be used to do the APPEND operation.
Otherwise, c-client will make a temporary IMAP stream, do the APPEND
operation, and close the temporary stream.  If you're doing more than one
APPEND to the IMAP destination, or if you already have an IMAP connection open
to that server, it is much faster to use an existing IMAP stream than to open
and close temporary streams.

> for that matter)? .... should "mailbox" then be NIL?

"mailbox" must NEVER be NIL.

It is meaningless to attempt an append to a POP3 stream.

The stream argument SHOULD be NIL for all cases except when:
 1) the destination is an IMAP mailbox
*and*
 2) there is an open IMAP stream to the destination server (it doesn't matter
    if it is open on some other mailbox).