Skip to content

PMBounceManager.get_all() does not return anything #32

Description

@dbajpeyi

I have a bunch of hard bounced emails in my postmark admin. I am not able to retrieve those using your PMBounceManager.get_all() api.

Let me reproduce the issue :

from django.conf import settings
from postmark import PMMail, PMBounceManager
mailer = PMMail(subject="test", sender=settings.EMAIL_HOST_USER,     to="sefhashj@asd1d3skj.com", tag="test", text_body="test")
mailer.send()

The email sefhashj@asd1d3skj.com is invalid and get hard bounced like many other and it is shown in my postmark dashboard.

Although when I do :

manager = PMBounceManager()
manager.get_all()

The response is : {u'TotalCount': 0, u'Bounces': []}

I tried using the REST API from postmark directly at the same time and it works !!

Here is what I did with the REST API:

import requests
url = "https://api.postmarkapp.com/bounces?type=HardBounce&inactive=true&count=25&offset=0"
headers = {'X-Postmark-Server-Token': settings.POSTMARK_API_KEY,     "Accept":"application/json", "Content-Type":"application/json"}
response = requests.get(url=url, headers=headers)

So now, print response.json() gives me this :

{u'TotalCount': 19, u'Bounces': [{u'BouncedAt': u'2014-02-28T01:18:52.4828241-    05:00', u'Name': u'Hard bounce', u'Su.......

Is there anything I am missing ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions