fix: smtp_proxy: update raise imap4.NoSuchMailbox (#243)

This commit is contained in:
Dream Hunter
2024-05-17 00:06:43 +08:00
committed by GitHub
parent 243dac976b
commit 607c04c810

View File

@@ -144,7 +144,7 @@ class Account(imap4.MemoryAccount):
def _emptyMailbox(self, name, id):
_logger.info(f"New mailbox: {name}, {id}")
if name != "INBOX":
raise Exception("Mailbox not found")
raise imap4.NoSuchMailbox(name.encode("utf-8"))
return SimpleMailbox(self.password)
def select(self, name, rw=1):