goto fail;
}
+ /* currently we set the \Seen flag on all messages, but probably we
+ * should scan the message Status header for flag info. Since we're
+ * already rereading the whole file for length it isn't any more
+ * expensive (it'd be nice if we had the file size passed in already
+ * by the code that writes the file, but that's a lot of changes.
+ * Ideally we'd have a HEADER structure with flag info here... */
for (last = EOF, len = 0; (c = fgetc(fp)) != EOF; last = c)
{
if(c == '\n' && last != '\r')
rewind (fp);
imap_munge_mbox_name (mbox, sizeof (mbox), mailbox);
- snprintf (buf, sizeof (buf), "APPEND %s {%d}", mbox, len);
+ snprintf (buf, sizeof (buf), "APPEND %s (\\Seen) {%d}", mbox, len);
imap_cmd_start (idata, buf);