def delivery_stats(self):
self._check_values()<EOL>req = Request(<EOL>__POSTMARK_URL__ + '<STR_LIT>',<EOL>None,<EOL>{<EOL>'<STR_LIT>': '<STR_LIT:application/json>',<EOL>'<STR_LIT:Content-Type>': '<STR_LIT:application/json>',<EOL>'<STR_LIT>': self.__api_key,<EOL>'<STR_LIT>': self.__user_agent<EOL>}<EOL>)<EOL>try:<EOL><INDENT>result = urlopen(req)<EOL>with closing(result):<EOL><INDENT>if result.code == <NUM_LIT:200>:<EOL><INDENT>return json.loads(result.read())<EOL><DEDENT>else:<EOL><INDENT>raise PMMailSendException('<STR_LIT>' % (result.code, result.msg))<EOL><DEDENT><DEDENT><DEDENT>except HTTPError as err:<EOL><INDENT>return err<EOL><DEDENT>
Returns a summary of inactive emails and bounces by type.