]> code.citadel.org Git - citadel.git/commitdiff
* imap_fetch.c: added a skeleton "ENVELOPE" fetch. Currently sends NIL's.
authorArt Cancro <ajc@citadel.org>
Tue, 7 Nov 2000 20:47:21 +0000 (20:47 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 7 Nov 2000 20:47:21 +0000 (20:47 +0000)
citadel/ChangeLog
citadel/imap_fetch.c

index 94f7cf697d80072a07c55909014def63c0d874eb..f654af93e4386e5baf16fe7b404003b8f95f1a82 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 573.22  2000/11/07 20:47:21  ajc
+ * imap_fetch.c: added a skeleton "ENVELOPE" fetch.  Currently sends NIL's.
+
  Revision 573.21  2000/11/07 15:54:53  ajc
  * xx FETCH n:n BODY[pn.MIME] now works
 
@@ -2122,4 +2125,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
-
index f15a6bec0bcd6569efe936bb036b9dca2c8b62fc..bea66046ecea2ac265b35d7607de414230ae5a65 100644 (file)
@@ -163,9 +163,9 @@ void imap_fetch_rfc822(int msgnum, char *whichfmt) {
 
 /*
  * Load a specific part of a message into the temp file to be output to a
- * client.  FIXME we can handle parts like "2" and "2.1" but we still have
- * to handle parts like "2.MIME" and "2.HEADER" (the latter maybe not ...
- * Mark Crispy's server doesn't seem to)
+ * client.  FIXME we can handle parts like "2" and "2.1" and even "2.MIME"
+ * but we still can't handle "2.HEADER" (which might not be a problem, because
+ * we currently don't have the ability to break out nested RFC822's anyway).
  *
  * Note: mime_parser() was called with dont_decode set to 1, so we have the
  * luxury of simply spewing without having to re-encode.
@@ -210,6 +210,25 @@ void imap_load_part(char *name, char *filename, char *partnum, char *disp,
 }
 
 
+/*
+ * Implements the ENVELOPE fetch item
+ * 
+ * FIXME ... we have to actually do something useful here.
+ */
+void imap_fetch_envelope(long msgnum, struct CtdlMessage *msg) {
+       cprintf("ENVELOPE (");
+       cprintf("NIL ");        /* date */
+       cprintf("NIL ");        /* subject */
+       cprintf("NIL ");        /* from */
+       cprintf("NIL ");        /* sender */
+       cprintf("NIL ");        /* reply-to */
+       cprintf("NIL ");        /* to */
+       cprintf("NIL ");        /* cc */
+       cprintf("NIL ");        /* bcc */
+       cprintf("NIL ");        /* in-reply-to */
+       cprintf("NIL");         /* message-id */
+       cprintf(")\r\n");
+}
 
 
 
@@ -352,7 +371,7 @@ void imap_do_fetch_msg(int seq, struct CtdlMessage *msg,
                        /* FIXME do something here */
                }
                else if (!strcasecmp(itemlist[i], "ENVELOPE")) {
-                       /* FIXME do something here */
+                       imap_fetch_envelope(IMAP->msgids[seq-1], msg);
                }
                else if (!strcasecmp(itemlist[i], "FLAGS")) {
                        imap_fetch_flags(msg);