extract_msg.msg_classes.meeting_cancellation Module

Module contents

class extract_msg.msg_classes.meeting_cancellation.MeetingCancellation(path, **kwargs)[source]

Bases: MeetingRelated

Class for a Meeting Cancellation object.

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 return None or raise one of the appropriate exceptions from extract_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.

getJson() str[source]

Returns the JSON representation of the Message.

property headerFormatProperties: Dict[str, str | Tuple[str | None, bool] | None | Dict[str, str | Tuple[str | None, bool] | None]] | None

Returns a dictionary of properties, in order, to be formatted into the header.

Keys are the names to use in the header while the values are one of the following:

  • None: Signifies no data was found for the property and it should be omitted from the header.

  • str: A string to be formatted into the header using the string encoding.

  • Tuple[Union[str, None], bool]: A string should be formatted into the header. If the bool is True, then place an empty string if the first value is None, otherwise follow the same behavior as regular None.

Additional note: If the value is an empty string, it will be dropped as well by default.

Additionally you can group members of a header together by placing them in an embedded dictionary. Groups will be spaced out using a second instance of the join string. If any member of a group is being printed, it will be spaced apart from the next group/item.

If you class should not do any header injection, return None from this property.

filename: str | None