-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
When an email contains embedded images, its HTML will include elements like:
<img style="max-width: 1139px;" size="297420" data-outlook-trace="F:1|T:1" src="cid:2b864420-1564-402e-a351-1e48597f4fbe">
Here, the src attribute uses the format ‘cid:’.
Currently, the attachment object in python-oxmsg does not return the content ID, which makes it impossible to associate the cid in the HTML with the corresponding attachment.
It is hoped that the attachment object can return the content ID, with a modification similar to the following:
class Attachment:
@lazyproperty
def cid(self) -> str | None:
"""The content id of this file.
Like "2b864420-1564-402e-a351-1e48597f4fbe".
"""
return self.properties.str_prop_value(c.PID_ATTACH_CONTENT_ID)
Metadata
Metadata
Assignees
Labels
No labels