ryanb / letter_opener

Preview mail in the browser instead of sending.
MIT License
3.73k stars 237 forks source link

Add simple throttling to letter_opener #94

Closed mfazekas closed 10 years ago

mfazekas commented 10 years ago

In the settings a max_rate with a max number of messages over a period of time. If this is configured we stop opening generated mails for those that would exceed this rate.

mfazekas commented 10 years ago

The issue this patch supposed to solve/improve is when letter_opener is configured and the app sends a few hundred emails. I have osx and chrome this renders the machine unusable for a few minutes as new chrome tabs keeps popping up a few times per sec. By configuring max_rate, we would only open few of those emails.

mfazekas commented 10 years ago

@nashby or @ryanb can you comment this request?

nashby commented 10 years ago

@mfazekas hey, sorry for the late response. Thank you for the pull request but I'm not really sure that we need to include it in this gem. Before giving me access to this project @ryanb told me that he wants to keep this gem as simple as possible. And I agree with that. Actually, I think you may consider using http://mailcatcher.me project. Probably it'll fit your needs better. Thank you again for trying to make this project better :)