Graph API中的QueryOption搜索电子邮件地址

时间:2020-10-25 21:27:50

标签: c# .net-core microsoft-graph-api

我想在我的已发送文件夹中搜索发送到“ john.smith1@gmail.com”的每封电子邮件。

我尝试了以下

 List<QueryOption> queryOptions = new List<QueryOption> { new QueryOption("$search", "john.smith1@gmail.com") }; 

List<QueryOption> queryOptions = new List<QueryOption> { new QueryOption("$search", "john.smith1%40gmail.com") }; 

 List<QueryOption> queryOptions = new List<QueryOption> { new QueryOption("$search", "to:john.smith1@gmail.com") }; 

List<QueryOption> queryOptions = new List<QueryOption> { new QueryOption("$search", "to:john.smith1%40gmail.com") }; 

  var messages = await client.Users["myuser@mydomain.com"].Messages.Request(queryOptions ).GetAsync();

以上所有方法均无效。它抱怨任何非字母字符(似乎不接受数字,点,“:”)

有什么建议吗?谢谢。

1 个答案:

答案 0 :(得分:1)

以这种方式使用-

python/py-arch.o: In function `gdbarch_to_arch_object(gdbarch*)':
.../build/gdb/../../../gdb-10.1/gdb/python/py-arch.c:86: undefined reference to `_Py_RefTotal'
python/py-arch.o: In function `gdbpy_ref_policy<_object>::decref(_object*)':
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_RefTotal'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_NegativeRefcount'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_Dealloc'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_RefTotal'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_RefTotal'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_RefTotal'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_NegativeRefcount'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_Dealloc'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_RefTotal'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_Dealloc'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_NegativeRefcount'

%22只是双引号。我们只是将其串联即可使用。