当电子邮件地址包含外来字符时,我在使用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);
答案 0 :(得分:0)
Exchange是否允许电子邮件地址中的变音符号?
电子邮件地址的管理规范RFC 5321不允许这样做。有关详细信息,请参阅this SO question on allowed email address characters。