Compare commits

..

No commits in common. "55202ba3b0607ef13017253df4e602b4b1263bc7" and "94452b3e416ca1b0d5c193ada31650697b56a622" have entirely different histories.

2 changed files with 0 additions and 13 deletions

View file

@ -77,16 +77,3 @@ def add_email(email):
return False
return False
def delete_bounced_emails():
url = settings.LISTMONK_API + 'bounces'
auth = (settings.LISTMONK_USER, settings.LISTMONK_PASSWORD)
r = requests.get(url + '?per_page=10000', auth=auth)
ids = [sub['subscriber_id'] for sub in r['data']['results']]
url = settings.LISTMONK_API + 'subscribers'
for id in ids:
r = requests.delete(url + '?id=%s' % id, auth=auth).json()
if not r.get("data"):
print(id)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB