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

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

 



>> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]