git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] send-mail: Add option to sleep between sending each email.

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Sep 8, 2011, 10:44 UTC
Message-ID
<CALkWK0mNBG8EwysjO8uoR+fU5ZM=Pz9es3t_+s6cFgR6NSodGQ@mail.gmail.com>
In-Reply-To
<CALkWK0nt4PXfBxGcAnavUkKM6AhKpZnw1NtZsNznzmGZiguFqA@mail.gmail.com>
Hi,
I mocked up a small patch to demonstrate the "special cover letter
handling" idea.  Let me know if you think it's worth pursuing.
Warning: Untested.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
-- 8< --
diff --git a/git-send-email.perl b/git-send-email.perl
index 98ab33a..30b8651 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -80,6 +80,7 @@ git send-email [options] <file | directory |
rev-list options >
     --[no-]suppress-from           * Send to self. Default off.
     --[no-]chain-reply-to          * Chain In-Reply-To: fields. Default off.
     --[no-]thread                  * Use In-Reply-To: field. Default on.
+    --[no-]initial-wait     <int>  * Wait <int> seconds after sending
first email.

   Administering:
     --confirm               <str>  * Confirm recipients before sending;
@@ -190,7 +191,7 @@ sub do_edit {
 }

 # Variables with corresponding config settings
-my ($thread, $chain_reply_to, $suppress_from, $signed_off_by_cc);
+my ($thread, $initial_wait, $chain_reply_to, $suppress_from,
$signed_off_by_cc);
 my ($to_cmd, $cc_cmd);
 my ($smtp_server, $smtp_server_port, @smtp_server_options);
 my ($smtp_authuser, $smtp_encryption);
@@ -205,6 +206,7 @@ my $not_set_by_user = "true but not set by the user";

 my %config_bool_settings = (
     "thread" => [\$thread, 1],
+    "initialwait" => [\$initial_wait, 0],
     "chainreplyto" => [\$chain_reply_to, $not_set_by_user],
     "suppressfrom" => [\$suppress_from, undef],
     "signedoffbycc" => [\$signed_off_by_cc, undef],
@@ -1141,6 +1143,11 @@ X-Mailer: git-send-email $gitversion
 		} else {
 			print "Result: OK\n";
 		}
+		if ($initial_wait) {
+			print "Sleeping: $initial_wait seconds.\n" if (!$quiet);
+			sleep($initial_wait);
+			$initial_wait = 0;
+		}
 	}

 	return 1;
Previous: Ramkumar RamachandraNext: Georgi Chorbadzhiyski
Message 6 of 17 in “send-mail: Add option to sleep between sending each email.”
  1. send-mail: Add option to sleep between sending each email.Georgi Chorbadzhiyski, Sep 7, 2011
  2. Ramkumar RamachandraSep 8, 2011
  3. Matthieu MoySep 8, 2011
  4. Ramkumar RamachandraSep 8, 2011
  5. Ramkumar RamachandraSep 8, 2011
  6. Ramkumar RamachandraSep 8, 2011
  7. Georgi ChorbadzhiyskiSep 8, 2011
  8. Matthieu MoySep 8, 2011
  9. Georgi ChorbadzhiyskiSep 8, 2011
  10. Georgi ChorbadzhiyskiSep 8, 2011
  11. Jakub NarebskiOct 3, 2011
  12. Georgi ChorbadzhiyskiSep 8, 2011
  13. Junio C HamanoSep 8, 2011
  14. Matthieu MoySep 8, 2011
  15. mfwitten@gmail.comSep 9, 2011
  16. Ramkumar RamachandraSep 12, 2011
  17. Georgi ChorbadzhiyskiSep 8, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.