我想使用自定义扩展属性进行唯一的预约以放入数据库。我使用 FindAppointments() 查找所有约会:
var appointments = _service.FindAppointments(WellKnownFolderName.Calendar, calendarView);
Run Code Online (Sandbox Code Playgroud)
然后我使用 foreach 循环完成所有约会:
foreach (var appointment in appointments)
Run Code Online (Sandbox Code Playgroud)
对于所有没有扩展属性的约会:
if (appointment.ExtendedProperties.Count <= 0)
Run Code Online (Sandbox Code Playgroud)
我绑定了一个自定义扩展属性,并使用我专门生成的唯一会议 ID (meetingId) 设置其值:uniqe int 编号:
var myPropertySetId = new Guid("{6C3A094F-C2AB-4D1B-BF3E-80D39BC79BD3}");
var extendedPropertyDefinition = new ExtendedPropertyDefinition(myPropertySetId, "RateTheMeetingId", MapiPropertyType.Integer);
var bindedAppointment = Appointment.Bind(_service, appointment.Id, new PropertySet(extendedPropertyDefinition));
bindedAppointment.SetExtendedProperty(extendedPropertyDefinition, meetingId);
bindedAppointment.Update(ConflictResolutionMode.AlwaysOverwrite);
Run Code Online (Sandbox Code Playgroud)
但它不起作用,因为我搜索会议并尝试输出扩展属性和 tis 值,但我没有得到结果,它没有绑定。我的问题是我做错了什么以及您可以提供哪些其他解决方案来为现有约会提供自定义扩展属性?顺便说一句,我正在使用 MS Exchange server 2010_SP2。
目前是否可以使用 Office 365 Rest API 来检索电子邮件的纯文本部分?
从 API 文档中可以看出,'Body' 对象包含可以是Text或HTML的 'ContentType' 字段。https://msdn.microsoft.com/office/office365/APi/complex-types-for-mail-contacts-calendar#ItemBody
然而,每当检索到多部分(HTML + 纯文本)消息时,API 只会返回 HTML 部分,如下所示:
{
"@odata.context": "",
"@odata.id": "",
"Id": "",
"Subject": "Test message",
"BodyPreview": "This is the body",
"Body": {
"ContentType": "HTML",
"Content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n</head>\r\n<body style=\"word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;\">\r\n<div>This is the body</div>\r\n</body>\r\n</html>\r\n"
},
"UniqueBody": {
"ContentType": "HTML",
"Content": "<html><body><div>\r\n<div><font face=\"Calibri,sans-serif\" size=\"2\" color=\"black\"><span style=\"font-size:14px;\">\r\n<div>This is the body</div>\r\n</span></font></div>\r\n</div>\r\n</body></html>"
}, …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用Microsoft.Exchange.WebServices 托管 API和基于此 FindFolder() 示例的代码来枚举 Exchange 帐户中的仅电子邮件文件夹。
以下代码过滤所有空文件夹、 、Task、Search和文件夹Contacts,Calendar但仍返回FreeBusy Data、Recoverable Items和Deletions文件夹。
有没有办法可以从返回的文件夹中过滤这些内容,而不是通过名称上的字符串匹配来过滤这些内容?事实上,还有一种过滤方式Sent Items吗Deleted Items?(虽然这些不能被重命名(而且我对它们是什么有更好的了解!),但我不太担心简单地按名称过滤掉它们)
Dim moreFoldersToReturn As Boolean = True
Const FOLDER_PAGE_SIZE As Integer = 10
Dim folderOffset As Integer = 0
While moreFoldersToReturn
' Create a view with a page size of x
Dim view As New FolderView(FOLDER_PAGE_SIZE, folderOffset)
' Identify the properties to return …Run Code Online (Sandbox Code Playgroud) 如何使用 Exchange EWS API 仅检索共享日历。
我如何知道使用 Exchange EWS API 共享哪个日历。
我们有一个用 Angular4+ 编写的网络电子邮件客户端。我们从 Exchange Web 服务加载电子邮件。
传入的邮件经过清理,然后呈现为 iframe 的源。即使图像也可以正常工作,除非它们是像这样嵌入的
<img width="486" height="572" id="Grafik_x0020_2" src="cid:image002.jpg@01D39103.BD805530">
Run Code Online (Sandbox Code Playgroud)
有没有办法在渲染电子邮件时显示图像?我们也可以下载附件。
谢谢并致以最诚挚的问候克里斯托夫
javascript email iframe embedded-resource exchangewebservices
我想从电子邮件中的附件中获取内容.我能够阅读电子邮件及其所有属性.附件是一个文本文件(.txt).我如何获取附件的实际文本内容?下面是我的代码的一部分,显示我如何获取每封电子邮件,然后获取其属性并将其存储在findResults列表中.像fileAttachment.Name这样的东西会给我附件的名称.fileAttachment.content.tostring()只显示system.Byte [].
FindItemsResults<Item> findResults = service.FindItems(fid1, new ItemView(int.MaxValue));
service.LoadPropertiesForItems(from Item item in findResults select item, PropertySet.FirstClassProperties);
foreach (Item item in findResults)
{
String body = "";
#region attachments
if (ReadAttachments == "1")
{
EmailMessage message = EmailMessage.Bind(service, item.Id, new PropertySet(BasePropertySet.IdOnly, ItemSchema.Attachments));
foreach (Attachment attachment in message.Attachments)
{
if (attachment is FileAttachment)
{
FileAttachment fileAttachment = attachment as FileAttachment;
// Load the file attachment into memory and print out its file name.
fileAttachment.Load();
String attachbody = fileAttachment.Content.ToString();
if (attachbody.Length > 8000) …Run Code Online (Sandbox Code Playgroud) 使用Exchange托管ApI,我需要获得创建日期更新或等于定义日期的所有约会.我怎么做?
我得到一个电子邮件地址的电子邮件地址,由";"分隔 看起来像这样:
geve@krag.de ;;; Tobias@nxs.de; Wissel@weg.de; Sand@nex.de; Claudia@bea.de ;;
我想在这里向这些电子邮件地址发送预约给一个人的样本:
Dim appointment As New EWS.Appointment(esb)
appointment.Subject = "Einladung zu einem Termin"
appointment.Body = txtThema.Text
appointment.Start = Von
appointment.End = Bis
appointment.Location = "Raum 202 Kleinostheim"
appointment.RequiredAttendees.Add("geve@krag.de") // HERE ARE THE Attendees
appointment.Save(EWS.SendInvitationsMode.SendToAllAndSaveCopy)
Run Code Online (Sandbox Code Playgroud)
我需要每个电子邮件地址第一个,因为他发送邮件.我怎样才能做到这一点?
在此先感谢您的帮助
我正在用C#开发一个应用程序,该应用程序使用EWS从交换中读取电子邮件。收到新电子邮件时,我需要将正文保存在数据库中,然后将其重新发送到其他电子邮件@。这已经完成了,但是问题是我应该保存没有签名的新电子邮件。有什么方法可以识别签名从哪里开始?
在此先感谢您的帮助:)
c# ×4
email ×3
.net ×1
attachment ×1
iframe ×1
javascript ×1
loops ×1
office365 ×1
php ×1
plaintext ×1
string ×1
string-split ×1
vb.net ×1