extract_msg.msg_classes.message Module
Module contents
- class extract_msg.msg_classes.message.Message(path, **kwargs)[source]
Bases:
MessageBase
Parser for Microsoft Outlook message files.
Supports all of the options from
MSGFile.__init__()
with some additional ones.- Parameters:
recipientSeparator – Optional, separator string to use between recipients.
deencapsulationFunc – Optional, if specified must be a callable that will override the way that HTML/text is deencapsulated from the RTF body. This function must take exactly 2 arguments, the first being the RTF body from the message and the second being an instance of the enum
DeencapType
that will tell the function what type of body is desired. The function should return a string for plain text and bytes for HTML. If any problems occur, the function must either returnNone
or raise one of the appropriate exceptions fromextract_msg.exceptions
. All other exceptions must be handled internally or they will not be caught. The original deencapsulation method will not run if this is set.
- filename: str | None