---
title: "Aspose::Email::Clients::Google::Criteria::set_Query method"
url: "https://reference.aspose.com/email/cpp/aspose.email.clients.google/criteria/set_query/"
product: "Aspose.Email for C++"
description: "Only return messages matching the specified query.Supports the same query format as the Gmail search box."
---


## set_Query {#set_query}

Only return messages matching the specified query.Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid:somemsgid@example.com is:unread".

**Returns:** void Aspose::Email::Clients::Google::

```cpp
set_Query(System::String value)
```

| Parameter | Description |
| --- | --- |
| value |  |

