Question

Is there any API for searching user emails (synced with the device) from an app?
For example, searching all the emails from one particular contact which has the word "watermelon" in it.

Was it helpful?

Solution

There is no API for accessing user emails.

The answer by Nicolas R only deals with searching email addresses in contacts, not searching the actual emails.

OTHER TIPS

Yes, there is one, provided by basic documentation: http://msdn.microsoft.com/en-us/library/windows/apps/hh286417.aspx

It's the SearchAsync method.

Sample:

SearchAsync("Chris@example.com", FilterKind.EmailAddress, "State String 4")

Other info and more detailed sample: http://msdn.microsoft.com/en-us/library/microsoft.phone.userdata.contacts.searchasync

But be careful with the results:

Email addresses are matched by exact and smart matching. The name portion before the @ symbol must match exactly

So if you intend to do a "like" search on the 1st part of the email, you will miss results

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top