Sicos1977 / MSGReader

C# Outlook MSG file reader without the need for Outlook
http://sicos1977.github.io/MSGReader
MIT License
489 stars 168 forks source link

Getting files from Sender/Reciever signature as an msg.attachment #395

Closed MemoArour closed 7 months ago

MemoArour commented 8 months ago

Hello,

while i was trying to extract attachments of a .msg File using this :

using (var msg = new Storage.Message(filePath)) { foreach (var attachment in msg.Attachments) {

i had to deal with the following problem : every kind of picture that might be in the sender/reciever signature as an attachment. how can i know which attachment is a real attachment and which one is a part of the signature?

Sicos1977 commented 7 months ago

Signature images normally are inline images. But foto's that are in the body of the e-mail are also inline. The best is to check the height and width of the image. Images in a signature tend to be very small

        /// <summary>
        ///     True when the attachment is inline
        /// </summary>
        public bool IsInline { get; internal set; }