Attachment.CreateAttachmentFromString
Contents
[
Hide
]CreateAttachmentFromString(string, string)
Creates a text attachment from a string.
public static Attachment CreateAttachmentFromString(string content, string name)
| Parameter | Type | Description |
|---|---|---|
| content | String | The content of the attachment. |
| name | String | The file name of the attachment. |
Return Value
The new attachment.
See Also
- class Attachment
- namespace Aspose.Email
- assembly Aspose.Email
CreateAttachmentFromString(string, string, Encoding, string)
Creates an attachment from a string with the specified encoding and media type.
public static Attachment CreateAttachmentFromString(string content, string name,
Encoding contentEncoding, string mediaType)
| Parameter | Type | Description |
|---|---|---|
| content | String | The content of the attachment. |
| name | String | The file name of the attachment. |
| contentEncoding | Encoding | The character encoding of the content. |
| mediaType | String | The MIME media type of the content, such as text/html. |
Return Value
The new attachment.
See Also
- class Attachment
- namespace Aspose.Email
- assembly Aspose.Email
CreateAttachmentFromString(string, ContentType)
Creates an attachment from a string with the specified content type.
public static Attachment CreateAttachmentFromString(string content, ContentType contentType)
| Parameter | Type | Description |
|---|---|---|
| content | String | The content of the attachment. |
| contentType | ContentType | The content type of the attachment, including its name. |
Return Value
The new attachment.
See Also
- class ContentType
- class Attachment
- namespace Aspose.Email
- assembly Aspose.Email