当电子邮件地址包含外来字符时,我在使用 EWS 将电子邮件地址保存给联系人时遇到问题。特别是,德语变音符号给我带来了问题。以下是尝试创建有效电子邮件地址的示例。EWS 抛出一个错误,指出电子邮件地址无效。有人可以帮忙吗?谢谢
Mailbox mailbox = new Mailbox("box@blah.com");
FolderId folderId = new FolderId(WellKnownFolderName.Contacts, mailbox);
Contact contact = new Contact(service);
contact.GivenName = "John";
contact.Surname = "Döe";
EmailAddress address = new EmailAddress();
address.Address = "JohnDöe@blah.com";
address.RoutingType = "SMTP";
contact.EmailAddresses[EmailAddressKey.EmailAddress1] = address;
contact.Save(folderId);