diff --git a/src/yuanfen/email.py b/src/yuanfen/email.py index 1e87496..816ec8c 100644 --- a/src/yuanfen/email.py +++ b/src/yuanfen/email.py @@ -53,7 +53,7 @@ def fetch(self, message_id: str, content_type: str = None): connection.login(self.address, self.password) connection.select() _, msg_data = connection.uid("fetch", message_id, "(RFC822)") - if not msg_data: + if not msg_data[0]: return None raw = email.message_from_bytes(msg_data[0][1]) mail_info = {}