[PATCH v9 8/9] imap-send: display the destination mailbox when sending a message
- From
Aditya Garg <gargaditya08@live.com>
- Date
- May 30, 2025, 17:32 UTC
- Message-ID
- <PN3PR01MB9597BCBC9EE3A93DA00A98FFB861A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
- In-Reply-To
- <PN3PR01MB9597B444D85F7A7D1B6546C3B861A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
Whenever we sent a message using the `imap-send` command, it would display a log showing the number of messages which are to be sent. For example:
Sending 1 message
100% (1/1) doneThis had been made more informative by adding the name of the destination folder as well:
Sending 1 message to Drafts folder...
100% (1/1) doneSigned-off-by: Aditya Garg <gargaditya08@live.com> --- imap-send.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/imap-send.c b/imap-send.c index c963ce62d8..95b78fda42 100644 --- a/imap-send.c +++ b/imap-send.c @@ -1596,7 +1596,8 @@ static int append_msgs_to_imap(struct imap_server_conf *server, } ctx->name = server->folder; - fprintf(stderr, "Sending %d message%s\n", total, (total != 1) ? "s" : ""); + fprintf(stderr, "Sending %d message%s to %s folder...\n", + total, (total != 1) ? "s" : "", server->folder); while (1) { unsigned percent = n * 100 / total; @@ -1704,7 +1705,8 @@ static int curl_append_msgs_to_imap(struct imap_server_conf *server, curl = setup_curl(server, &cred); curl_easy_setopt(curl, CURLOPT_READDATA, &msgbuf); - fprintf(stderr, "Sending %d message%s\n", total, (total != 1) ? "s" : ""); + fprintf(stderr, "Sending %d message%s to %s folder...\n", + total, (total != 1) ? "s" : "", server->folder); while (1) { unsigned percent = n * 100 / total; int prev_len;
-- 2.49.0.639.ge2dd5d9d81