
## SetContentFromString (1 of 3) {#setcontentfromstring_1}

Sets the content from string.

**Returns:** void Aspose::Email::

```cpp
SetContentFromString(System::String contentString, System::SharedPtr < Aspose::Email::Mime::ContentType > contentType)
```

| Parameter | Description |
| --- | --- |
| contentString | The content string. |
| contentType | Type of the content. |

---

## SetContentFromString (2 of 3) {#setcontentfromstring_2}

Sets the content from string.

**Returns:** void Aspose::Email::

```cpp
SetContentFromString(System::String contentString, System::SharedPtr < System::Text::Encoding > encoding, System::SharedPtr < Aspose::Email::Mime::ContentType > contentType, Aspose::Email::Mime::TransferEncoding te)
```

| Parameter | Description |
| --- | --- |
| contentString | The content string. |
| encoding | The encoding. |
| contentType | The content type. |
| te | The transfer encoding. |

---

## SetContentFromString (3 of 3) {#setcontentfromstring_3}

Sets the content from string.

**Returns:** void Aspose::Email::

```cpp
SetContentFromString(System::String contentString, System::SharedPtr < System::Text::Encoding > encoding, System::String mediaType)
```

| Parameter | Description |
| --- | --- |
| contentString | The content string. |
| encoding | The encoding. |
| mediaType | Type of the media. |

