Giter VIP home page Giter VIP logo

Comments (12)

awdeorio avatar awdeorio commented on August 19, 2024 1

I like this idea! Do you think a single option like --limit-rate=10 expressed in emails per minute would work for most users? That might be more simple for the end user. Email could be sent spaced evenly every 1/RATE_LIMIT minutes. Loosely inspired by wget.

Another single-option possibility might be --wait=6. Wait 6 seconds between emails. Also inspired by wget.

from mailmerge.

bexelbie avatar bexelbie commented on August 19, 2024 1

Sounds good. I was actually thinking round up and wrote round down anyway :D

While I wouldn't mind working on this, if anyone is watching and wants it - take it. I have limited time.

from mailmerge.

bexelbie avatar bexelbie commented on August 19, 2024

I prefer --limit-rate=10 with that being number of emails per minute, assuming we define rounding (I'd round down) and sleep for that many (micro)seconds between each mail. I'd like anything that doesn't require users to do math :D

from mailmerge.

awdeorio avatar awdeorio commented on August 19, 2024

I like --limit-rate=10.

I'm thinking that math should round up, possibly to the nearest second. Here's an example. Let's say a server has a limit of 7 messages per second. 60/7 = 8571.429 ms between messages = 8571 after rounding down. The first message will be sent at t=0, and the 8th message will be sent at t=59997 ms = 59.997 s. This could trigger the server's message limit.

Also, a UI idea: perhaps printing a . every 1 s while waiting might be nice. Maybe something like Waiting 8 seconds for rate limit ........

from mailmerge.

awdeorio avatar awdeorio commented on August 19, 2024

Shower thought: a rate limit a property of a server. Perhaps the best place to specify the rate limit would be in mailmerge_server.conf. Of course, it would be fine to have a command line option to override the config file limit.

from mailmerge.

bexelbie avatar bexelbie commented on August 19, 2024

I like this idea and it feels logical. I don't know if we really need an override switch ... unless we want to start letting more stuff be overriden.

One of my use cases would be to override the username for some emails. Do you want to go down this road?

from mailmerge.

awdeorio avatar awdeorio commented on August 19, 2024

One of my use cases would be to override the username for some emails. Do you want to go down this road?

My preference would be for a clean separation of content (template.txt) and server configuration (server.conf).

from mailmerge.

bexelbie avatar bexelbie commented on August 19, 2024

My preference would be for a clean separation of content (template.txt) and server configuration (server.conf).

Agreed. I was suggesting that if we allow the override of the limit field in server.conf should we allow it for other fields? If so, we may want to design a switch setup that groups this.

from mailmerge.

awdeorio avatar awdeorio commented on August 19, 2024

Agreed. I was suggesting that if we allow the override of the limit field in server.conf should we allow it for other fields? If so, we may want to design a switch setup that groups this.

Ah, now I understand, seems reasonable. I think that for the purpose of this issue, keeping it simple would be good. I like the idea of adding a server config parameter that controls the limit rate.

from mailmerge.

sudhanshu456 avatar sudhanshu456 commented on August 19, 2024

Please implement that idea if you can, otherwise, I'm working on it, I started using your mailmerge python lib but the error was my SMTP server allow 14 mails/sec but due to high speed to internet connection sending rate is much higher than that, so many people didn't get the mails.

from mailmerge.

bexelbie avatar bexelbie commented on August 19, 2024

@sudhanshu456 please submit your PR :) I am backed up and am not trying to "lick this cookie"

from mailmerge.

MrSeccubus avatar MrSeccubus commented on August 19, 2024

Should be fixed in PR #114 now. But with a minute resolution, not a second resolution.

from mailmerge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.