---
title: "Aspose::Email::Storage::Pst::PersonalStorage::TryToSaveMessage method"
url: "https://reference.aspose.com/email/cpp/aspose.email.storage.pst/personalstorage/trytosavemessage/"
product: "Aspose.Email for C++"
description: "Saves the message, with specified entryID, to a stream."
---


## TryToSaveMessage {#trytosavemessage}

Saves the message, with specified entryID, to a stream.

**Returns:** The SaveResult that represents the result of item saving.

```cpp
TryToSaveMessage(System::String entryId, System::SharedPtr < System::IO::Stream > stream)
```

| Parameter | Description |
| --- | --- |
| entryId | The entry id. |
| stream | The stream for writing. |

