AttachmentCreateAttachmentFromString Method (String, String, Encoding, String)

Creates the attachment from string.

Namespace:  Aspose.Email
Assembly:  Aspose.Email (in Aspose.Email.dll) Version: 21.3
Syntax
public static Attachment CreateAttachmentFromString(
	string content,
	string name,
	Encoding contentEncoding,
	string mediaType
)

Parameters

content
Type: SystemString
A string that represents the content of attachment.
name
Type: SystemString
The attachment name.
contentEncoding
Type: System.TextEncoding
The content encoding.
mediaType
Type: SystemString
The media type name

Return Value

Type: Attachment
Returns created attachment
See Also