[TeamMsgExtractor #56] [TeamMsgExtractor #248] Added new function MessageBase.asEmailMessage which will convert the MessageBase instance, if possible, to an email.message.EmailMessage object. If an embedded MSG file on a MessageBase object is of a class that does not have this function, it will simply be attached to the instance as bytes.
Changed imports in message_base.py to help with type checkers.
Changed from using email.parser.EmailParser to email.parser.HeaderParser in MessageBase.header.
Changed some of the internal code for MessageBase.header. This should improve usage of it, and should not have any noticeable negative changes. You man notice some of the values parse slightly differently, but this effect should be mostly suppressed.
v0.43.0
MessageBase.asEmailMessage
which will convert theMessageBase
instance, if possible, to anemail.message.EmailMessage
object. If an embedded MSG file on aMessageBase
object is of a class that does not have this function, it will simply be attached to the instance as bytes.message_base.py
to help with type checkers.email.parser.EmailParser
toemail.parser.HeaderParser
inMessageBase.header
.MessageBase.header
. This should improve usage of it, and should not have any noticeable negative changes. You man notice some of the values parse slightly differently, but this effect should be mostly suppressed.