Aspose.Email.Examples.CSharp.Email.ReadMessageByPreservingTNEFAttachments.Run C# (CSharp) Метод

Run() публичный статический Метод

public static Run ( ) : void
Результат void
        public static void Run()
        {
            // ExStart:ReadMessageByPreservingTNEFAttachments
            // The path to the File directory.
            string dataDir = RunExamples.GetDataDir_Email();

            MsgLoadOptions options = new MsgLoadOptions();
            options.PreserveTnefAttachments = true;
            MailMessage eml = MailMessage.Load(dataDir + "EmbeddedImage1.msg", options);
            foreach (Attachment attachment in eml.Attachments)
            {
                Console.WriteLine(attachment.Name);
            }
            // ExEnd:ReadMessageByPreservingTNEFAttachments
        }
    }
ReadMessageByPreservingTNEFAttachments