0

I'm having issues using EWS to save an email address to a contact when the email address contains foreign characters. In particular, the German umlaut is giving me issues. The following is an example of an attempt to create a valid email address. EWS throws back an error saying the email address isn't valid. Can anybody help? Thanks

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);
Klam
  • 505
  • 1
  • 5
  • 11

1 Answers1

0

Does Exchange allow umlauts in email addresses?

RFC 5321, the governing spec for email addresses, doesn't allow them. See this SO question on allowed email address characters for more info.

Community
  • 1
  • 1
neontapir
  • 4,698
  • 3
  • 37
  • 52