当前位置: 动力学知识库 > 问答 > 编程问答 >

.net - can't open doc attachment file c#

问题描述:

I have function that sends 2 office documents (Microsoft Word 97 - 2003 Document) files via System.Net.Mail.MailMessage as Attachments:

MailMessage mail = new MailMessage(); mail.Attachments.Add(new Attachment(ServerMapPath("ExtraFiles\\ExtraFile1.doc"), "application/msword"));

mail.Attachments.Add(new Attachment(ServerMapPath("ExtraFiles\\ExtraFile2.doc"), "application/msword"));

My problem is - when i receiving the email i can open the 1st file in preview but when i try to open the 2nd file in preview i get the next msg:

If i'm downloading the file i can open them no problem!

Boat files are same and almost same size (around 40kb) and have same props.. dont have any permission problem (boat files are not protected).

Any ideas ???

分享给朋友:
您可能感兴趣的文章:
随机阅读: