X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=imap%2Fmessage.c;h=3c5011c10e018cb10e1d56da9247358f459c88f5;hb=777c7ccc259a8b7f5fadac70267c59e62a2cb300;hp=96d7e229af629885eb201fe502d862cc1f1c129d;hpb=5c310cabcfafe551dcad7638c007daae1c7d3710;p=apps%2Fmadmutt.git diff --git a/imap/message.c b/imap/message.c index 96d7e22..3c5011c 100644 --- a/imap/message.c +++ b/imap/message.c @@ -562,9 +562,12 @@ int imap_append_message (CONTEXT *ctx, MESSAGE *msg) rewind (fp); imap_munge_mbox_name (mbox, sizeof (mbox), mailbox); - snprintf (buf, sizeof (buf), "APPEND %s (\\Seen%s%s) {%lu}", mbox, - msg->flags.replied ? " \\Answered" : "", - msg->flags.flagged ? " \\Flagged" : "", + snprintf (buf, sizeof (buf), "APPEND %s (%s%s%s%s%s) {%lu}", mbox, + msg->flags.read ? "\\Seen" : "", + msg->flags.read && (msg->flags.replied || msg->flags.flagged) ? " " : "", + msg->flags.replied ? "\\Answered" : "", + msg->flags.replied && msg->flags.flagged ? " " : "", + msg->flags.flagged ? "\\Flagged" : "", (unsigned long) len); imap_cmd_start (idata, buf);