
imap_status 함수를 사용할 때는 'ALL' 대신에 '*'를 사용해야 합니다. '*'는 모든 메시지를 검색하는 검색 조건입니다.
예를 들어, 'ALL' 대신에 '*'를 사용하면 다음과 같이 코드를 수정할 수 있습니다.
python
import imaplib
mail = imaplib.IMAP4_SSL('imap.gmail.com')
mail.login('내 이메일', '내 비밀번호')
mail.select('inbox')
status, messages = mail.search(None, '*')
이러한 코드를 실행하면 모든 메시지를 검색할 수 있습니다.
2025-05-07 14:31