0

当电子邮件地址包含外来字符时,我在使用 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);
4

1 回答 1

0

Exchange 是否允许在电子邮件地址中使用变音符号?

RFC 5321是电子邮件地址的管理规范,不允许它们。有关更多信息,请参阅有关允许的电子邮件地址字符的 SO 问题

于 2012-10-18T16:02:24.870 回答