git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Michael Witten <mfwitten@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH RFC 1/6] send-email: Add --delay for separating emails
Date: Thu, 9 Apr 2009 15:59:04 -0500	[thread overview]
Message-ID: <b4087cc50904091359q7cadc31cp150b2681775e7022@mail.gmail.com> (raw)
In-Reply-To: <7vskkh1va5.fsf@gitster.siamese.dyndns.org>

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

> 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

  parent reply	other threads:[~2009-04-09 21:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-08 14:25 [PATCH RFC 1/6] send-email: Add --delay for separating emails Michael Witten
2009-04-08 14:35 ` Michael Witten
2009-04-09  8:14 ` Jeff King
2009-04-09  8:49   ` Junio C Hamano
2009-04-09 17:51     ` Nicolas Pitre
2009-04-09 17:48   ` Nicolas Pitre
2009-04-09 19:28     ` Junio C Hamano
2009-04-09 19:36       ` Nicolas Pitre
2009-04-09 20:59       ` Michael Witten [this message]
2009-04-09 21:02         ` Michael Witten
2009-04-09 16:17 ` [PATCH RFC 1/6] " Nicolas Sebrecht
2009-04-09 17:27   ` Michael Witten
2009-04-09 17:38     ` Michael Witten
2009-04-09 17:45     ` Nicolas Sebrecht
2009-04-09 18:43       ` Michael Witten
  -- strict thread matches above, loose matches on Subject: below --
2009-04-07 21:25 [PATCH RFC 1/6] " Michael Witten
2009-04-07 21:51 ` Jeff King
2009-04-07 23:17 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4087cc50904091359q7cadc31cp150b2681775e7022@mail.gmail.com \
    --to=mfwitten@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).