---
title: "Aspose::Email::Clients::Google::Criteria::set_NegatedQuery method"
url: "https://reference.aspose.com/email/cpp/aspose.email.clients.google/criteria/set_negatedquery/"
product: "Aspose.Email for C++"
description: "Only return messages not matching the specified query."
---


## set_NegatedQuery {#set_negatedquery}

Only return messages not 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_NegatedQuery(System::String value)
```

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

