mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
Thresholding bounced newsletters email.
This commit is contained in:
parent
d9e51f89a3
commit
7f045ba535
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ def main():
|
||||||
delivered = stats["delivered"]["total"]
|
delivered = stats["delivered"]["total"]
|
||||||
accepted = stats["delivered"]["total"]
|
accepted = stats["delivered"]["total"]
|
||||||
bounced = stats["failed"]["permanent"]["total"] + stats["failed"]["temporary"]["total"]
|
bounced = stats["failed"]["permanent"]["total"] + stats["failed"]["temporary"]["total"]
|
||||||
if bounced / float(delivered) > 0.5:
|
if bounced / float(delivered) > 0.5 and bounced > 100:
|
||||||
requests.post(
|
requests.post(
|
||||||
"https://api.mailgun.net/v2/%s/messages" % settings.MAILGUN_SERVER_NAME,
|
"https://api.mailgun.net/v2/%s/messages" % settings.MAILGUN_SERVER_NAME,
|
||||||
auth=("api", settings.MAILGUN_ACCESS_KEY),
|
auth=("api", settings.MAILGUN_ACCESS_KEY),
|
||||||
|
|
Loading…
Add table
Reference in a new issue