parsedmarc.mail
🔗
GmailConnection
🔗
GmailConnection(
token_file: str,
credentials_file: str,
scopes: list[str],
include_spam_trash: bool,
reports_folder: str,
oauth2_port: int,
)
Bases: MailboxConnection
MailboxConnection for Google accounts using the Google API.
This will support both Gmail and Google Workspace accounts.
PARAMETER | DESCRIPTION |
---|---|
token_file |
TYPE:
|
credentials_file |
TYPE:
|
scopes |
|
include_spam_trash |
TYPE:
|
reports_folder |
TYPE:
|
oauth2_port |
TYPE:
|
watch
🔗
Checks the mailbox for new messages every n seconds
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:
|
user |
TYPE:
|
password |
TYPE:
|
port |
Port to connect to
TYPE:
|
ssl |
Use SSL/TLS
TYPE:
|
verify |
Verify the SSL/TLS certification
TYPE:
|
timeout |
TYPE:
|
max_retries |
TYPE:
|
watch
🔗
Use an IDLE IMAP connection to parse incoming emails, and pass the results to a callback function
MSGraphConnection
🔗
MSGraphConnection(
auth_method: str,
client_id: str,
client_secret: str,
token_file: str,
allow_unencrypted_storage: bool,
username: str | None = None,
password: str | None = None,
tenant_id: str | None = None,
mailbox: str | None = None,
)
Bases: MailboxConnection
MailboxConnection to a Microsoft account via the Micorsoft Graph API
PARAMETER | DESCRIPTION |
---|---|
auth_method |
TYPE:
|
mailbox |
TYPE:
|
client_id |
TYPE:
|
client_secret |
TYPE:
|
username |
TYPE:
|
password |
TYPE:
|
tenant_id |
TYPE:
|
token_file |
TYPE:
|
allow_unencrypted_storage |
TYPE:
|
fetch_messages
🔗
Returns a list of message UIDs in the specified folder