Re: [PATCH v11 8/9] imap-send: display the destination mailbox when sending a message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Aditya Garg <gargaditya08@xxxxxxxx> writes:

> 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...

Nice ;-)

>      100% (1/1) done
>
> Signed-off-by: Aditya Garg <gargaditya08@xxxxxxxx>
> ---
>  imap-send.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/imap-send.c b/imap-send.c
> index 9c3c8d8c3c..3565a91ca3 100644
> --- a/imap-send.c
> +++ b/imap-send.c
> @@ -1599,7 +1599,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;
>  
> @@ -1708,7 +1709,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;




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux