我一直在使用 Microsoft Graph API 访问 Exchange Online (Office365) 就地存档。
它基本上是一个经过身份验证的 GET HTTPS 请求https://graph.microsoft.com/v1.0/users/user@company.onmicrosoft.com/mailFolders/ArchiveMsgFolderRoot,它曾经可以正常工作。
从本周(2020 年 4 月下旬)开始,针对相同资源(无变化)的相同请求开始失败,原因如下:
404响应: {'error': {'code': 'ErrorInvalidMailboxItemId', 'message': "Item Id doesn't belong to the current mailbox.", 'innerError': {'request-id': '4a339242-9821-42a9-9622-4b1f7cd2c162', 'date': '2020-04-24T10:01:35'}}}
其他邮箱(不是ArchiveMsgFolderRoot)继续正常工作,没有问题。只有就地存档会受到影响。
您现在如何从 Graph API 访问 In-places Archives?你能分享一个例子吗?
我需要使用c#向名为"DL-IT"的Exchange通讯组列表发送电子邮件.
有谁知道如何实现这一目标?
有没有人成功地与SAS 9.1.3或9.2中的微软交换服务器进行交互?我知道可以使用SAS Ent完成.指南4.x,但如果常规SAS能够做到这一点,我对这条路线不感兴趣.
我将通过查询字符串Folder.Id.UniqueId从FindFolders查询中检索到的文件夹的属性传递给另一个页面.在第二页上,我想使用它UniqueId绑定到文件夹以列出其邮件项:
string parentFolderId = Request.QueryString["id"];
...
Folder parentFolder = Folder.Bind(exchangeService, parentFolderId);
// do something with parent folder
Run Code Online (Sandbox Code Playgroud)
当我运行此代码时,它会抛出异常,告诉我Id是格式错误的.我想也许它需要包裹在一个FolderId对象中:
Folder parentFolder = Folder.Bind(exchangeService, new FolderId(parentFolderId));
Run Code Online (Sandbox Code Playgroud)
同样的问题.
我已经搜索了一段时间,并找到了一些关于Base64/UTF8转换的建议,但同样没有解决问题.
任何人都知道如何绑定到具有给定唯一ID的文件夹?
这是我的简单测试程序(使用ActionMailer 3.0.8,Ruby 1.9.2p180 Mac OS X):
require 'rubygems'
require 'action_mailer'
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "my_exchange_server",
:port => 25,
:domain => 'my_domain.org',
:authentication => :login,
:user_name => 'my_user',
:password => 'my_password',
:enable_starttls_auto => false
}
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.default :from => 'from_email@my_company.com'
m = ActionMailer::Base.mail :to => 'to_email@my_company.com', :subject => 'this is a test', :body => 'this is a test'
m.deliver
Run Code Online (Sandbox Code Playgroud)
尝试各种身份验证类型我收到以下错误:
:普通错误:
smtp.rb:966:in `check_auth_response': 504 5.7.4 Unrecognized authentication type. (Net::SMTPAuthenticationError)
Run Code Online (Sandbox Code Playgroud)
:登录错误:
smtp.rb:972:in `check_auth_continue': …Run Code Online (Sandbox Code Playgroud) 注意:我正在使用VBA和Office 2007.(我会使用C#,但项目参数不允许这样做)
我试图在Outlook或API中找到一些方法,允许我通过从Access数据库提供Outlook EntryID或MAPI"PR_ENTRYID"属性来打开Outlook邮件项.我找到了许多对所述代码的引用,但我从未见过有人真正发布过一个解决方案.我试图包括对mapi32.dll和OLMAPI32.dll的引用,但是我收到以下错误:"无法添加对指定文件的引用." 我猜这是因为那些dll是用于.NET的.
您将给予的任何帮助将不胜感激.
我正在尝试编写powershell脚本,将用户从交换列表中隐藏起来.
我能够找到以下命令:
Set-Mailbox -Identity [user id here] -HiddenFromAddressListsEnabled $true
它没有给我一个错误信息,当我运行命令两次时,我得到以下警告:
警告:命令已成功完成,但未修改"[user id here]"的设置.
这可能意味着该命令确实有效.
但是当我转到Exchange管理控制台并打开用户配置文件时," hide user from exchange address lists"复选框已关闭.
可能是什么原因?
该EWS托管API具有的功能,用于检索和管理屈指可数的电子邮件对话(又名 电子邮件线程).不幸的是,其中很大一部分只适用于新版本的Exchange(2013等)
Outlook确实实现了针对旧版 Exchange的电子邮件线程.也许它通过自己管理线程来实现这一点(Outlook是桌面应用程序,电子邮件在本地计算机上复制,因此可以通过Conversation Topic等轻松分组).
现在,如何在Web应用程序中支持电子邮件线程?通常在Exchange客户端中支持此功能的操作是什么?通过支持我的意思是:
EWS Managed Api等问题:
我现在使用的(作为解决方法):
我有一个Web应用程序调用EWS托管API连接到office365.
我在MSDN上关注了EWS Managed API 2.0客户端应用程序入门文档.
在web.config我指定的代理pac:
<configuration>
<system.net>
<defaultProxy useDefaultCredentials="false">
<proxy autoDetect="False" bypassonlocal="True" scriptLocation="http://example.com:8080/proxy.pac" usesystemdefault="False" />
</defaultProxy>
</system.net>
[...]
</configuration>
Run Code Online (Sandbox Code Playgroud)
我尝试以下列方式连接到Exchange:
public static ExchangeService getExchangeService(String username)
{
ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack;
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);
service.Credentials = new WebCredentials(USER_365, PWD_365, DOMAIN_365);
service.UseDefaultCredentials = true;
//I've tried both WebProxy settings, this:
service.WebProxy = WebRequest.GetSystemWebProxy();
//And this (with no success):
//service.WebProxy = WebRequest.DefaultWebProxy;
//I've also tried Autodiscover...
service.AutodiscoverUrl(USER_365, RedirectionUrlValidationCallback);
//...and direct url
//service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx"); …Run Code Online (Sandbox Code Playgroud) 我正在自定义文件夹中起草电子邮件.
EmailMessage msg= new EmailMessage(service);
msg.setSubject("Hello world!");
msg.setBody(MessageBody.getMessageBodyFromText("Draft email using the EWS Java API."));
msg.getToRecipients().add("someone@contoso.com");
// Tried to set extended property but not worked
ExtendedPropertyDefinition headerProperty = new ExtendedPropertyDefinition(
DefaultExtendedPropertySet.InternetHeaders,
"X-Classification",
MapiPropertyType.String);
msg.setExtendedProperty(headerProperty,"Provision X-header Internet message header");
msg.save(CUSTOM_FOLDER_ID);
Run Code Online (Sandbox Code Playgroud)
我开始知道扩展属性对分类/权限标题有帮助.参考链接 - https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-provision-x-headers-by-using-ews-in-exchange 但是如何设置分类/许可?X-Classification-限制类似这样或其他任何方式?
我不想使用setImportance/setSensitivity方法.
如何使用ews java api为EmailMessage 设置权限/分类(public/Restricted/Internal)?
工作示例的代码片段表示赞赏.提前致谢
exchange-server ×10
c# ×3
.net ×2
asp.net ×2
email ×2
ewsjavaapi ×1
java ×1
mailitem ×1
mapi ×1
office365api ×1
outlook ×1
powershell ×1
ruby ×1
sas ×1
smtp ×1
vba ×1