# 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
- Open or save emails in a variety of formats.
- Parse, read and save Microsoft Outlook messages and message archives.
- Comprehensive Object Model for MIME messages.
- Embed objects to email messages.
- Send individual or bulk emails.
- Create emails using Mail Merge while incorporating data from different types of sources.
- Create & consume iCalendar compliant recurrence patterns.
- [Connect to POP3 server for message management](https://docs.aspose.com/display/emailpythonnet/Connect+to+POP3+Server).
- [Access and manage emails, folders & filters using IMAP](https://docs.aspose.com/display/emailpythonnet/Connecting+to+IMAP+Server).
- [Send or forward messages via SMTP](https://docs.aspose.com/display/emailpythonnet/Sending+and+Forwarding+Messages).
- Verify email addresses, processing bounced messages, analyze spam via Bayesian & more.
## 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](https://docs.aspose.com/display/emailpythonnet/Developer+Guide) for all possible usage scenarios.
## Inspect PST Structure & Items via Python
```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
```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)
```
Raw data
{
"_id": null,
"home_page": "https://products.aspose.com/email/python-net",
"name": "Aspose.Email-for-Python-via-NET",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.14,>=3.5",
"maintainer_email": null,
"keywords": "Email, eml, msg, pst, ost, outlook, exchange, imap, smtp, pop3, thef, mht, mbo",
"author": "Aspose",
"author_email": null,
"download_url": null,
"platform": "macos_x86_64",
"description": "# Python Email API\n\nAspose.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.\n\nAspose.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.\n\n## Email Features\n\n- Open or save emails in a variety of formats.\n- Parse, read and save Microsoft Outlook messages and message archives.\n- Comprehensive Object Model for MIME messages.\n- Embed objects to email messages.\n- Send individual or bulk emails.\n- Create emails using Mail Merge while incorporating data from different types of sources.\n- Create & consume iCalendar compliant recurrence patterns.\n- [Connect to POP3 server for message management](https://docs.aspose.com/display/emailpythonnet/Connect+to+POP3+Server).\n- [Access and manage emails, folders & filters using IMAP](https://docs.aspose.com/display/emailpythonnet/Connecting+to+IMAP+Server).\n- [Send or forward messages via SMTP](https://docs.aspose.com/display/emailpythonnet/Sending+and+Forwarding+Messages).\n- Verify email addresses, processing bounced messages, analyze spam via Bayesian & more.\n\n\n## Read & Write Email Formats\n\n**Microsoft Outlook:** MSG, PST, OST, OFT\n**Email:** EML, EMLX, MBOX\n**Others:** ICS, HTML, MHTML\n\n## Getting Started with Aspose.Email for Python via .NET\n\nAre 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](https://docs.aspose.com/display/emailpythonnet/Developer+Guide) for all possible usage scenarios.\n\n## Inspect PST Structure & Items via Python\n\n```python\npersonalStorage = PersonalStorage.from_file(dataDir + \"template.pst\")\nfolderInfoCollection = personalStorage.root_folder.get_sub_folders()\nfor folderInfo in folderInfoCollection:\n\tprint(\"Folder: \" + folderInfo.display_name)\n\tprint(\"Total Items: \" + str(folderInfo.content_count))\n\tprint(\"Total Unread Items: \" + str(folderInfo.content_unread_count))\n\tprint(\"----------------------\")\n```\n\n## Send Bulk Emails via SMTP using Python\n\n```python\nmessage1 = MailMessage(\"from@gmail.com\", \"to@gmail.com\", \"Sending Bulk Emails using Aspose.Email\", \"message1, how are you?\")\nmessage2 = MailMessage(\"from@gmail.com\", \"to@gmail.com\", \"Sending Bulk Emails using Aspose.Email\", \"message2, how are you?\")\nmessage3 = MailMessage(\"from@gmail.com\", \"to@gmail.com\", \"Sending Bulk Emails using Aspose.Email\", \"message3, how are you?\")\n\nmanyMsg = MailMessageCollection()\nmanyMsg.append(message1)\nmanyMsg.append(message2)\nmanyMsg.append(message3)\n\n#Send using Smtp Client\nclient = SmtpClient(\"smtp.gmail.com\", 995, \"username\", \"password\")\nclient.security_options = SecurityOptions.AUTO\n\nclient.send(manyMsg)\n```\n",
"bugtrack_url": null,
"license": "https://company.aspose.com/legal/eula",
"summary": "A collection of components for working with email. It makes it easy to work with Outlook PST, EML, MSG and MHT files.",
"version": "25.2",
"project_urls": {
"Homepage": "https://products.aspose.com/email/python-net"
},
"split_keywords": [
"email",
" eml",
" msg",
" pst",
" ost",
" outlook",
" exchange",
" imap",
" smtp",
" pop3",
" thef",
" mht",
" mbo"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "398eaf71af4c6790aa819eed1a07314ba69826daf26bd7f2438b2742da73428c",
"md5": "e1344ae09d8fddb13c77c1a20024c865",
"sha256": "c435e3ca89f7c4699d7b0f4f21129557fb453cdb18708b7363075e66a68b9d20"
},
"downloads": -1,
"filename": "Aspose.Email_for_Python_via_NET-25.2-py3-none-macosx_10_14_x86_64.whl",
"has_sig": false,
"md5_digest": "e1344ae09d8fddb13c77c1a20024c865",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.14,>=3.5",
"size": 77731345,
"upload_time": "2025-02-07T12:19:15",
"upload_time_iso_8601": "2025-02-07T12:19:15.570950Z",
"url": "https://files.pythonhosted.org/packages/39/8e/af71af4c6790aa819eed1a07314ba69826daf26bd7f2438b2742da73428c/Aspose.Email_for_Python_via_NET-25.2-py3-none-macosx_10_14_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "728f2004fb168e4694b1176a0f5e70fd77027afe24a05f23ba483110f8ecfef6",
"md5": "2634b6e2384756d9ee2afb1f9570aea8",
"sha256": "dc6f435c8186428d5652bfbf148ae19791ede86489230f91b26eec5f0aecbe26"
},
"downloads": -1,
"filename": "Aspose.Email_for_Python_via_NET-25.2-py3-none-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "2634b6e2384756d9ee2afb1f9570aea8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.14,>=3.5",
"size": 57078997,
"upload_time": "2025-02-07T12:19:52",
"upload_time_iso_8601": "2025-02-07T12:19:52.679394Z",
"url": "https://files.pythonhosted.org/packages/72/8f/2004fb168e4694b1176a0f5e70fd77027afe24a05f23ba483110f8ecfef6/Aspose.Email_for_Python_via_NET-25.2-py3-none-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4387266cc5e1cab82506257ab7dbb055dec135e1bff0939bbbc8e98f723c043e",
"md5": "5efabdd4aa5f853b9e0a00ed3f8c0210",
"sha256": "7863ddb172e5e77da9ed96859a2266a006fd8245c903cfdd41a629fc5b951bf8"
},
"downloads": -1,
"filename": "Aspose.Email_for_Python_via_NET-25.2-py3-none-manylinux1_x86_64.whl",
"has_sig": false,
"md5_digest": "5efabdd4aa5f853b9e0a00ed3f8c0210",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.14,>=3.5",
"size": 88243044,
"upload_time": "2025-02-07T12:20:44",
"upload_time_iso_8601": "2025-02-07T12:20:44.014197Z",
"url": "https://files.pythonhosted.org/packages/43/87/266cc5e1cab82506257ab7dbb055dec135e1bff0939bbbc8e98f723c043e/Aspose.Email_for_Python_via_NET-25.2-py3-none-manylinux1_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4a0f79f9942de897b1144fd9356d1219624d4355687b55c98317e75c01083e7f",
"md5": "a301b74f96426ea02aee625b2db12b5a",
"sha256": "ac0d0e09e7a628da73a81b51720226ce2c18d752eff618404266930668c11027"
},
"downloads": -1,
"filename": "Aspose.Email_for_Python_via_NET-25.2-py3-none-win_amd64.whl",
"has_sig": false,
"md5_digest": "a301b74f96426ea02aee625b2db12b5a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.14,>=3.5",
"size": 58576285,
"upload_time": "2025-02-07T12:21:16",
"upload_time_iso_8601": "2025-02-07T12:21:16.709630Z",
"url": "https://files.pythonhosted.org/packages/4a/0f/79f9942de897b1144fd9356d1219624d4355687b55c98317e75c01083e7f/Aspose.Email_for_Python_via_NET-25.2-py3-none-win_amd64.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-07 12:19:15",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "aspose.email-for-python-via-net"
}