code: def delivery_stats(self):
          '''
          Returns a summary of inactive emails and bounces by type.
          '''
          self._check_values()
  
          req = Request(
              __POSTMARK_URL__ + 'deliverystats',
              None,
              {
                  'Accept': 'application/json',
                  'Content-Type': 'application/json',
                  'X-Postmark-Server-Token': self.__api_key,
                  'User-agent': self.__user_agent
              }
          )
  
          # Attempt send
          try:
              # print 'sending request to postmark:'
              result = urlopen(req)
              with closing(result):
                  if result.code == 200:
                      return json.loads(result.read())
                  else:
                      raise PMMailSendException('Return code %d: %s' % (result.code, result.msg))
  
          except HTTPError as err:
              return erf delivery_stats(self):
          '''
          Returns a summary of inactive emails and bounces by type.
          '''
          self._check_values()
  
          req = Request(
              __POSTMARK_URL__ + 'deliverystats',
              None,
              {
                  'Accept': 'application/json',
                  'Content-Type': 'application/json',
                  'X-Postmark-Server-Token': self.__api_key,
                  'User-agent': self.__user_agent
              }
          )
  
          # Attempt send
          try:
              # print 'sending request to postmark:'
              result = urlopen(req)
              with closing(result):
                  if result.code == 200:
                      return json.loads(result.read())
                  else:
                      raise PMMailSendException('Return code %d: %s' % (result.code, result.msg))
  
          except HTTPError as err:
              return err
docs: Returns a summary of inactive emails and bounces by type.