目前,我们的一个应用程序使用 Exchange Web 服务创建新邮件并将其保存到用户的草稿文件夹。我们希望在创建这些消息时自动将用户的默认签名附加到这些消息中,但我一直无法找到访问签名以将其附加到正文的方法。当前使用以下代码创建电子邮件:
CreateItemType createEmailRequest = new CreateItemType();
createEmailRequest.MessageDisposition = MessageDispositionType.SaveOnly;
createEmailRequest.MessageDispositionSpecified = true;
DistinguishedFolderIdType draftsFolder = new DistinguishedFolderIdType();
draftsFolder.Id = distinguishedFolderIdNameType;
createEmailRequest.SavedItemFolderId = new TargetFolderIdType();
createEmailRequest.SavedItemFolderId.Item = draftsFolder;
MessageType emailMessage = new MessageType();
emailMessage.Subject = subject;
emailMessage.Body = new BodyType();
emailMessage.Body.BodyType1 = bodyType;
emailMessage.Body.Value = body;
emailMessage.Sensitivity = SensitivityChoicesType.Normal;
emailMessage.SensitivitySpecified = true;
createEmailRequest.Items = new NonEmptyArrayOfAllItemsType();
createEmailRequest.Items.Items = new ItemType[1];
createEmailRequest.Items.Items[0] = emailMessage;
关于如何获取当前用户的默认签名并将其附加到电子邮件正文的任何想法?