Skip to main content

A collection of components for working with email. It makes it easy to work with Outlook PST, EML, MSG and MHT files.

Project description

Python Email API

Aspose.Email for Python via .NET is a suite of flexible and easy to use class libraries brought together to produce the most powerful Email Programming Component available today. The Python Email API implements a number of network protocols including SMTP, MIME, POP3, IMAP for creating, sending & receiving messages without needing to have any other component. It can also manipulate, extract & convert message files & message archives.

Aspose.Email for Python via .NET also provides classes and algorithms that are useful for time-oriented recurrence patterns, or schedules. The central concepts are coherent with the iCalendar RFC (2445), so it is easy to incorporate iCalendar features into your own python applications.

Email Features

Read & Write Email Formats

Microsoft Outlook: MSG, PST, OST, OFT Email: EML, EMLX, MBOX Others: ICS, HTML, MHTML

Getting Started with Aspose.Email for Python via .NET

Are you ready to give Aspose.Email for Python via .NET a try? Simply execute pip install Aspose.Email-for-Python-via-NET to get the latest version & try any of the following code snippets. You may also check the detailed Developer's Guide for all possible usage scenarios.

Inspect PST Structure & Items via Python

personalStorage = PersonalStorage.from_file(dataDir + "template.pst")
folderInfoCollection = personalStorage.root_folder.get_sub_folders()
for folderInfo in folderInfoCollection:
	print("Folder: " + folderInfo.display_name)
	print("Total Items: " + str(folderInfo.content_count))
	print("Total Unread Items: " + str(folderInfo.content_unread_count))
	print("----------------------")

Send Bulk Emails via SMTP using Python

message1 = MailMessage("from@gmail.com", "to@gmail.com", "Sending Bulk Emails using Aspose.Email", "message1, how are you?")
message2 = MailMessage("from@gmail.com", "to@gmail.com", "Sending Bulk Emails using Aspose.Email", "message2, how are you?")
message3 = MailMessage("from@gmail.com", "to@gmail.com", "Sending Bulk Emails using Aspose.Email", "message3, how are you?")

manyMsg =  MailMessageCollection()
manyMsg.append(message1)
manyMsg.append(message2)
manyMsg.append(message3)

#Send using Smtp Client
client = SmtpClient("smtp.gmail.com", 995, "username", "password")
client.security_options = SecurityOptions.AUTO

client.send(manyMsg)

Read Messages from Thunderbird's MBOX

reader = MboxrdStorageReader(dataDir + "ExampleMbox.mbox", False)

eml = reader.read_next_message()
while (eml is not None):
    print("Subject: " + eml.subject)
    # save this message in EML or MSG format
    eml.save(eml.subject + "_out.eml", aspose.email.SaveOptions.default_eml)
    eml.save(eml.subject + "_out.msg", aspose.email.SaveOptions.default_msg_unicode)

    eml = reader.read_next_message();

reader.dispose();

Product Page | Documentation | API Reference | Code Examples | Blog | Free Support | Temporary License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

Aspose.Email_for_Python_via_NET-20.8-py3-none-win_amd64.whl (34.9 MB view details)

Uploaded Python 3 Windows x86-64

Aspose.Email_for_Python_via_NET-20.8-py3-none-win32.whl (31.6 MB view details)

Uploaded Python 3 Windows x86

File details

Details for the file Aspose.Email_for_Python_via_NET-20.8-py3-none-win_amd64.whl.

File metadata

  • Download URL: Aspose.Email_for_Python_via_NET-20.8-py3-none-win_amd64.whl
  • Upload date:
  • Size: 34.9 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.4.2 requests/2.18.1 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.0

File hashes

Hashes for Aspose.Email_for_Python_via_NET-20.8-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b900e6a32c7f96b3ce9d0d1a9e0df3b601b9747f39f6f103850d2d3b9f561ea6
MD5 a6244a7f73bbfdb5aa00a3368a8640b1
BLAKE2b-256 3a86e8d4ad7f061e26aa80181b3c172f6345d5b1d3a2457f7f1a8849263c35d9

See more details on using hashes here.

File details

Details for the file Aspose.Email_for_Python_via_NET-20.8-py3-none-win32.whl.

File metadata

  • Download URL: Aspose.Email_for_Python_via_NET-20.8-py3-none-win32.whl
  • Upload date:
  • Size: 31.6 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.4.2 requests/2.18.1 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.0

File hashes

Hashes for Aspose.Email_for_Python_via_NET-20.8-py3-none-win32.whl
Algorithm Hash digest
SHA256 a1362c6a0e63bcdd8dda46a7ee7f8dae54c309badf8cd7c74e2e0b01ec152c2d
MD5 faa123ab178a565da922c0cc14cd4c96
BLAKE2b-256 b01e1102c3db4dc9f9bc580718de762e5e2c0ef058bea7d291916d6f00f5ee39

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page