System.Net.Mail.Attachment.CreateAttachmentFromString Method

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.

Syntax

public static Attachment CreateAttachmentFromString (string content, string name, System.Text.Encoding contentEncoding, string mediaType)

Parameters

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.

Returns

An object of type System.Net.Mail.Attachment.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System.Net.Mail
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0