@staticmethod
def _is_attachment(headers):
    """
        Check if a given payload is an attachment (or it's email body)
        Valid from https://www.w3.org/Protocols/rfc1341/5_Content-Transfer-Encoding.html
        :param headers:
        :return:
        """
    if 'content-disposition' in headers:
        if headers['content-disposition'].startswith('attachment'):
            return True
    if 'content-transfer-encoding' in headers:
        trans_enc = headers['content-transfer-encoding'].lower()
        if trans_enc in ('quoted-printable', '7bit', '8bit'):
            return False
        else:
            return True
