Skip to content

Commit bf22c37

Browse files
AdityaGarg8gitster
authored andcommitted
imap-send: display the destination mailbox when sending a message
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) done This had been made more informative by adding the name of the destination folder as well: Sending 1 message to Drafts folder... 100% (1/1) done Signed-off-by: Aditya Garg <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2dacd35 commit bf22c37

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

imap-send.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,8 @@ static int append_msgs_to_imap(struct imap_server_conf *server,
15561556
}
15571557
ctx->name = server->folder;
15581558

1559-
fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
1559+
fprintf(stderr, "Sending %d message%s to %s folder...\n",
1560+
total, (total != 1) ? "s" : "", server->folder);
15601561
while (1) {
15611562
unsigned percent = n * 100 / total;
15621563

@@ -1692,7 +1693,8 @@ static int curl_append_msgs_to_imap(struct imap_server_conf *server,
16921693

16931694
curl_easy_setopt(curl, CURLOPT_READDATA, &msgbuf);
16941695

1695-
fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
1696+
fprintf(stderr, "Sending %d message%s to %s folder...\n",
1697+
total, (total != 1) ? "s" : "", server->folder);
16961698
while (1) {
16971699
unsigned percent = n * 100 / total;
16981700
int prev_len;

0 commit comments

Comments
 (0)