Frequently Asked Questions

Frequently Asked Questions

Licensing & Open Source

What is the licensing model for Aspose.Email FOSS for Python?

Aspose.Email FOSS for Python is released under the MIT License. You can use it in personal, commercial, and open-source projects without restriction. No runtime licence key or activation is required.

Can I use Aspose.Email FOSS for Python in a commercial product?

Yes. The MIT License permits unrestricted commercial use with no royalty payments or activation servers required at runtime.

Installation & Requirements

How do I install Aspose.Email FOSS for Python?

Install the Aspose.Email FOSS package from PyPI using the pip command below:

pip install aspose-email-foss

What Python version is required?

Python 3.10 or later. The library is pure Python with zero external dependencies and no native compiled components.

Format Support

Which email formats are supported?

FormatImportExport
MSG (Outlook MAPI)YesYes
CFB (Compound File Binary)YesYes

Can I read EML files directly?

Yes, via the standard library bridge. Parse the EML string with Python’s built-in email.message_from_string(), then pass the result to MapiMessage.from_email_message() to convert it to a MAPI message.

Can I convert MSG to EML format?

Yes. Call msg.to_email_string() to get the message in RFC 5322 text format.

API Usage

How do I load an MSG file?

Call MapiMessage.from_file() with the path to the .msg file to load it and access its subject and other properties:

from aspose.email_foss.msg import MapiMessage

msg = MapiMessage.from_file("message.msg")
print(msg.subject)

How do I create and save a new message?

Call MapiMessage.create() with subject and body strings, then call save() with a file path to write the MSG file:

from aspose.email_foss.msg import MapiMessage

msg = MapiMessage.create("Subject", "Body text")
msg.save("output.msg")

How do I add an attachment to a message?

Call add_attachment() on a MapiMessage instance, passing the filename, binary data read from disk, and the MIME type string:

with open("document.pdf", "rb") as f:
    data = f.read()
msg.add_attachment("document.pdf", data, mime_type="application/pdf")

How do I convert an MSG to EML?

Load the MSG file with MapiMessage.from_file(), call to_email_string() to get RFC 5322 text, and write it to a .eml file:

msg = MapiMessage.from_file("message.msg")
eml_text = msg.to_email_string()
with open("output.eml", "w", encoding="utf-8") as f:
    f.write(eml_text)

Known Limitations

Is TNEF (winmail.dat) supported?

No. Only the standard MSG (CFB) format is supported natively. TNEF/winmail.dat is not yet implemented.

Is calendar or appointment support available?

The library handles MSG files generically. Calendar-specific properties can be accessed via MAPI property IDs, but there is no dedicated calendar or appointment API.

Is IMAP, SMTP, or POP3 supported?

No. The library handles MSG and CFB files directly and does not include any network or protocol layer.

See Also

 English