mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Clean up hosted email limit
This commit is contained in:
parent
c1a3a4f71a
commit
2326ddfd3b
@ -158,6 +158,7 @@ if (! defined('APP_NAME')) {
|
||||
define('MAX_DOCUMENT_SIZE', env('MAX_DOCUMENT_SIZE', 10000)); // KB
|
||||
define('MAX_EMAIL_DOCUMENTS_SIZE', env('MAX_EMAIL_DOCUMENTS_SIZE', 10000)); // Total KB
|
||||
define('MAX_ZIP_DOCUMENTS_SIZE', env('MAX_EMAIL_DOCUMENTS_SIZE', 30000)); // Total KB (uncompressed)
|
||||
define('MAX_EMAILS_SENT_PER_HOUR', 90);
|
||||
define('DOCUMENT_PREVIEW_SIZE', env('DOCUMENT_PREVIEW_SIZE', 300)); // pixels
|
||||
define('DEFAULT_FONT_SIZE', 9);
|
||||
define('DEFAULT_HEADER_FONT', 1); // Roboto
|
||||
|
@ -379,7 +379,7 @@ class ContactMailer extends Mailer
|
||||
|
||||
// http://stackoverflow.com/questions/1375501/how-do-i-throttle-my-sites-api-users
|
||||
$hour = 60 * 60;
|
||||
$hour_limit = 50; // users are limited to 50 emails/hour
|
||||
$hour_limit = MAX_EMAILS_SENT_PER_HOUR;
|
||||
$hour_throttle = Cache::get("email_hour_throttle:{$key}", null);
|
||||
$last_api_request = Cache::get("last_email_request:{$key}", 0);
|
||||
$last_api_diff = time() - $last_api_request;
|
||||
|
Loading…
Reference in New Issue
Block a user