add python version of attachment mimetype fix