Skip to content

parsedmarc.mail.imap 🔗

IMAPConnection 🔗

IMAPConnection(
    host: str | None = None,
    user: str | None = None,
    password: str | None = None,
    port: int | None = None,
    ssl: bool = True,
    verify: bool = True,
    timeout: int = 30,
    max_retries: int = 4,
)

Bases: MailboxConnection

MailboxConnection for connecting to a mailbox via IMAP.

PARAMETER DESCRIPTION
host

Host to connect to

TYPE: str | None DEFAULT: None

user

TYPE: str | None DEFAULT: None

password

TYPE: str | None DEFAULT: None

port

Port to connect to

TYPE: int | None DEFAULT: None

ssl

Use SSL/TLS

TYPE: bool DEFAULT: True

verify

Verify the SSL/TLS certification

TYPE: bool DEFAULT: True

timeout

TYPE: int DEFAULT: 30

max_retries

TYPE: int DEFAULT: 4

watch 🔗

watch(check_callback, check_timeout)

Use an IDLE IMAP connection to parse incoming emails, and pass the results to a callback function