Creates a mail attachment using the content from the specified string, the specified MIME content type name, character encoding, and MIME header information for the attachment.
- content
A string that contains the content for this attachment.
- name
The MIME content type name value in the content type associated with this attachment.
- contentEncoding
An System.Text.Encoding. This value can be null.
- mediaType
A string that contains the MIME Content-Header information for this attachment. This value can be null.
![]()
An object of type System.Net.Mail.Attachment.