What's the correct way to name an email attachment in .NET?
1 answer
The correct one to use is Attachment.Name.
The information for Attachment.ContentType.Name is
When specifying content to attach as a stream or string, you can use Name to set the name of the file that stores the content on the recipient's system.
Information for Attachment.ContentDisposition.FileName -
The FileName property allows the sender to suggest a name that will be used to store the email attachment on the receiving computer. This title is just a suggestion ; the receiving system can ignore it. The name must not contain path information; any such information is ignored by the receiving computer.
+3
source to share