---
title: "Aspose::Email::Clients::Exchange::InboxRule::CreateRuleMoveContaining method"
url: "https://reference.aspose.com/email/cpp/aspose.email.clients.exchange/inboxrule/createrulemovecontaining/"
product: "Aspose.Email for C++"
description: "Creates inbox rule that moves messages containing the specified strings in either the body or the subject into the specified folder"
---


## CreateRuleMoveContaining {#createrulemovecontaining}

Creates inbox rule that moves messages containing the specified strings in either the body or the subject into the specified folder

**Returns:** A created InboxRule

```cpp
CreateRuleMoveContaining(System::ArrayPtr< System::String > filter, System::String destinationFolderId)
```

| Parameter | Description |
| --- | --- |
| filter | A strings to search |
| destinationFolderId | An id of folder in which messages will be moved |

