我正在使用SmtpClient该类发送邮件并附加文件.一切似乎工作正常,除了电子邮件附件中的文件名filestest.docx而不是test.docx.默认情况下,它附加文件所在的文件夹名称.我只想看到实际的文件名.
SmtpClient
filestest.docx
test.docx
msg.Attachments.Add(new Attachment("I:/files/test.docx"));
有任何想法吗?
c# asp.net
asp.net ×1
c# ×1