在交换服务器上找到带有“/”的电子邮件使用 C# 和 WebDAV 的名称
我在此处提出并回答了一个问题与此问题相关,并显示我如何使用 C# 和 WebDAV 访问我的电子邮件。此代码适用于除主题中带有正斜杠的电子邮件之外的所有内容。
电子邮件主题示例:
“您有一条新的/更改的记录要 review.eml”
Exchange URI 示例:
“http://MyExchangeServerName/Exchange/[email protected]/Inbox/"
此电子邮件的完整路径为:
"http://MyExchangeServerName/Exchange/[电子邮件受保护]/Inbox/您有一条新的/已更改的记录要 review.eml"
不幸的是,此路径不是在寻找“您有一条新的/已更改的记录 ”到我的收件箱中的“review.eml”电子邮件,它正在我的收件箱的“您有一个新”文件夹中查找标题为“已更改记录到review.eml”的电子邮件(当然,该文件夹不存在)。
有没有办法构建此字符串,以便将电子邮件的正斜杠识别为真实电子邮件名称的一部分,而不是收件箱的子文件夹?
I asked and answered a question here that is related to this issue and shows how I'm accessing my emails using C# and WebDAV. This code works fine for everything except emails that have a forward slash in the subject.
Example email subject:
"You have a new/changed record to review.eml"
Example Exchange URI:
"http://MyExchangeServerName/Exchange/[email protected]/Inbox/"
The full path to this email would be:
"http://MyExchangeServerName/Exchange/[email protected]/Inbox/You have a new/changed record to review.eml"
Unfortunately, this path isn't looking for the "You have a new/changed record to review.eml" email in my Inbox, it is looking for an email titled "changed record to review.eml" in the "You have a new" folder of my Inbox (which, of course, does not exist).
Is there a way to construct this string so that the forward slash of the email is recognized as being part of the true email name, rather than a subfolder of my inbox?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
URL 对主题行进行编码,使其成为有效的 URL。每个“/”将被其编码“%2F”替换。
例如,“http://MyExchangeServerName/Exchange/[电子邮件受保护] /Inbox/您有一个新的%2Fchanged 记录到 review.eml"
URL encode the subject line so that it is a valid URL. Each "/" would be replaced by its encoding "%2F".
For example, "http://MyExchangeServerName/Exchange/[email protected]/Inbox/You have a new%2Fchanged record to review.eml"