Gets or sets the attachment file content.
The Data property can either be an array of byte or a string value. If Data contains a string value, it will be converted from UNICODE using the Charset character set encoding. If Data is set to a value that is neither a string nor a byte array, the value will be converted to string if possible or an error will occur.
This sample shows how to create a new MailAttachment.
MailAttachment oAttachment = new MailAttachment(); oAttachment.Data = "Hello World!"; oAttachment.Type = "text/plain"; oAttachment.Name = "test.txt";
MailAttachment Class | MailMill Namespace | Mail.Charset