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

Re: [PATCH RFC 1/6] send-email: Add --delay for separating emails

From
Michael Witten <mfwitten@gmail.com>
Date
Apr 9, 2009, 20:59 UTC
Message-ID
<b4087cc50904091359q7cadc31cp150b2681775e7022@mail.gmail.com>
In-Reply-To
<7vskkh1va5.fsf@gitster.siamese.dyndns.org>
Show 6 quoted lines
>> My ISP doesn't allow me to send more than 20 emails at once.
>
> Hmm, I first thought you meant 20 emails in a single smtp session, but it
> appears that we create a new instance of Net::SMTP for each piece of email
> so it really sounds like it is time based (N pieces of e-mail within M
> minutes).

Actually, there is a lot of ||= going on in there, so it would seem that only one smtp session is created; the weird thing is that STARTTLS and $smtp->hello() are run each time through send_message(), which I think is probably wrong. If it works, then I imagine it's just superfluous.

In any case, if his ISP doesn't like him sending more than 20 emails per session, then it certainly won't like 1 session per email.

Show 7 quoted lines
> Perhaps --pause=N,M to say "Pause N seconds for every M messages", where
> Michael's --delay=N is just a shorthand for --pause=N,1 is what you want?
> That is, reset the counter to 0 at the beginning, increment it after
> sending each message, and when the counter is M and if you have more to
> send, you wait for N seconds and reset the counter to 0.  Then when you
> have a series smaller than 20 you won't have to suffer from any artificial
> delay.
This sounds reasonable, but I would have:
    --rate=M/N
Michael Witten
Previous: Nicolas PitreNext: Michael Witten
Message 9 of 15 in “Re: [PATCH RFC 1/6] send-email: Add --delay for separating emails”
  1. Michael WittenApr 8, 2009
  2. Michael WittenApr 8, 2009
  3. Jeff KingApr 9, 2009
  4. Junio C HamanoApr 9, 2009
  5. Nicolas PitreApr 9, 2009
  6. Nicolas PitreApr 9, 2009
  7. Junio C HamanoApr 9, 2009
  8. Nicolas PitreApr 9, 2009
  9. Michael WittenApr 9, 2009
  10. Michael WittenApr 9, 2009
  11. 1/6 Re: send-email: Add --delay for separating emailsNicolas Sebrecht, Apr 9, 2009
  12. Michael WittenApr 9, 2009
  13. Michael WittenApr 9, 2009
  14. 1/6 Re: send-email: Add --delay for separating emailsNicolas Sebrecht, Apr 9, 2009
  15. Michael WittenApr 9, 2009

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.