extract_msg.attachments.web_att Module

Module contents

class extract_msg.attachments.web_att.WebAttachment(msg: MSGFile, dir_: str, propStore: PropertiesStore)[source]

Bases: AttachmentBase

An attachment that exists on the internet and not attached to the MSG file directly.

Parameters:
  • msg – the Message instance that the attachment belongs to.

  • dir – the directory inside the MSG file where the attachment is located.

  • propStore – The PropertiesStore instance for the attachment.

getFilename() str[source]

Returns the filename to use for the attachment.

Parameters:
  • contentId – Use the contentId, if available.

  • customFilename – A custom name to use for the file.

If the filename starts with “UnknownFilename” then there is no guarantee that the files will have exactly the same filename.

save(**kwargs) Tuple[SaveType, List[str] | str | None][source]

Raises a NotImplementedError unless :param skipNotImplemented: is set to True.

If it is, returns a value that indicates no data was saved.

property data: None

The bytes making up the attachment data.

property originalPermissionType: AttachmentPermissionType | None

The permission type data associated with a web reference attachment.

property permissionType: AttachmentPermissionType | None

The permission type data associated with a web reference attachment.

property providerName: str | None

The type of web service manipulating the attachment.

property type: AttachmentType

An enum value that identifies the type of attachment.

property url: str | None

The url for the web attachment. If this is not set, that is probably an error.