new 'reset_bounce_score_after_days' site setting
This commit is contained in:
parent
d2e22ab215
commit
7648916314
|
@ -1212,6 +1212,7 @@ en:
|
|||
|
||||
soft_bounce_score: "Score added to the user when a temporary bounce happens."
|
||||
hard_bounce_score: "Score added to the user when a permanent bounce happens."
|
||||
reset_bounce_score_after_days: "Automatically reset bounce score after X days."
|
||||
|
||||
manual_polling_enabled: "Push emails using the API for email replies."
|
||||
pop3_polling_enabled: "Poll via POP3 for email replies."
|
||||
|
|
|
@ -624,6 +624,7 @@ email:
|
|||
regex: '^key-\h{32}$'
|
||||
soft_bounce_score: 1
|
||||
hard_bounce_score: 2
|
||||
reset_bounce_score_after_days: 30
|
||||
|
||||
|
||||
files:
|
||||
|
|
|
@ -170,7 +170,7 @@ module Email
|
|||
|
||||
if user = User.find_by(email: email)
|
||||
user.user_stat.bounce_score += score
|
||||
user.user_stat.reset_bounce_score_after = 30.days.from_now
|
||||
user.user_stat.reset_bounce_score_after = SiteSetting.reset_bounce_score_after_days.days.from_now
|
||||
user.user_stat.save
|
||||
|
||||
if user.user_stat.bounce_score >= SiteSetting.bounce_score_threshold
|
||||
|
|
Loading…
Reference in New Issue