Attachment.CreateAttachmentFromString

CreateAttachmentFromString(string, string)

Creates the attachment from string.

public static Attachment CreateAttachmentFromString(string content, string name)
ParameterTypeDescription
contentStringA string that represents the content of attachment.
nameStringThe attachment name.

Return Value

Returns created attachment

See Also


CreateAttachmentFromString(string, string, Encoding, string)

Creates the attachment from string.

public static Attachment CreateAttachmentFromString(string content, string name, 
    Encoding contentEncoding, string mediaType)
ParameterTypeDescription
contentStringA string that represents the content of attachment.
nameStringThe attachment name.
contentEncodingEncodingThe content encoding.
mediaTypeStringThe media type name

Return Value

Returns created attachment

See Also


CreateAttachmentFromString(string, ContentType)

Creates the attachment from string.

public static Attachment CreateAttachmentFromString(string content, ContentType contentType)
ParameterTypeDescription
contentStringA string that represents the content of attachment.
contentTypeContentTypeThe ContentType.

Return Value

Returns created attachment

See Also