Skip to main content

Enterprise Email Connector for Assets

An enterprise-grade Python library for securely connecting to and processing email assets. It supports IMAP connections over SSL, and modern authentication methods like OAuth2 (XOAUTH2) using MSAL.

Features

  • Secure Connection: Connect securely to IMAP servers (e.g., Office365, Gmail) over SSL.
  • Modern Authentication: Support for traditional username/password or Azure OAuth2 (Client ID, Secret, and Tenant ID).
  • Email Fetching: Fetch emails based on IMAP search criteria.
  • Robust Parsing: Safely parses raw emails and extracts subjects and plain text bodies.

Installation

You can install the connector from PyPI:

pip install assets-email-connector

Usage

Basic Usage with Password Authentication

from assets_email_connector import EnterpriseEmailConnector

connector = EnterpriseEmailConnector(
    host="imap.example.com",
    username="user@example.com",
    password="securepassword"
)

if connector.connect():
    emails = connector.fetch_emails(mailbox="inbox", search_criteria="ALL")
    print(f"Fetched {emails['total_emails']} emails.")
    for email in emails["emails"]:
        print(f"Subject: {email['subject']}")
    
    connector.disconnect()

Advanced Usage with OAuth2 (Azure Active Directory)

from assets_email_connector import EnterpriseEmailConnector

connector = EnterpriseEmailConnector(
    host="outlook.office365.com",
    username="user@example.com",
    tenant_id="your-tenant-id",
    client_id="your-client-id",
    client_secret="your-client-secret"
)

if connector.connect():
    emails = connector.fetch_emails()
    print(f"Fetched {emails['total_emails']} emails.")
    connector.disconnect()

Requirements

  • Python 3.8+
  • msal >= 1.20.0

Metadata

Release files for assets-email-connector 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for assets-email-connector 0.1.0
File Size Uploaded Provenance
assets_email_connector-0.1.0.tar.gz 8.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for assets-email-connector 0.1.0
File Interpreter ABI Platform
assets_email_connector-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / assets_email_connector-0.1.0.tar.gz

Download URL assets_email_connector-0.1.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2b31f6b5efba9fb581a68d7a5be965c46dafb767ee77c7b3532cdcd10315aeeb
BLAKE2b-256 checksum
How to use checksums
cb46d1b59214610b9bec4353acd45d6b2e8927948e63201b12370ac51aa89db2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.0

Release files / assets_email_connector-0.1.0-py3-none-any.whl

Download URL assets_email_connector-0.1.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2dea7ef3e091a9a5a0ca982f645b01ca3619de1f978e66b760c3e4b5c9d3bf17
BLAKE2b-256 checksum
How to use checksums
4fe5d4d2abcb62a6155da9b7c7a237b61f43dad73e1a08b1f8d82737e9b109c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.0

Security for assets-email-connector 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page