locked
Where is WinRT API to RETRIEVE email? [I know MS are pushing 'share' for use cases normally associated with sending an email]

    Question

  • Hi,

    Today I found a long forum exchange between some guy who wanted to email and the moderators who were insistent that the way forward was to use the "Share contract" (whatever that means). 

    However, I'm looking to programmatically sift through my junk emails from a given (spammy) email address, looking to keep some emails if some keywords are found and delete others if no keywords match.

    So, where is WinRT (Windows 8.1) API to RETRIEVE email please?

    Thanks,

    Simon


    Yours

    Friday, February 21, 2014 6:36 PM

Answers

All replies

  • There is not email specific API and no way for apps to interact directly with other apps (such as email apps) on the local system.

    Depending on the server you're talking to they may provide a web API you can connect to.

    See Sharing and exchanging data for information on the share contract. It won't be relevant for your scenario though.

    --Rob

    • Proposed as answer by Dave SmitsMVP Friday, February 21, 2014 7:23 PM
    Friday, February 21, 2014 7:00 PM
    Owner
  • (My team owns the .NET SMTP API)

    I can go into more detail about why an email API is a really hard thing to get right.

    Reading email is a surprisingly difficult thing to do.  For a long time, we could simply assume that all email providers used POP3 -- but then there came IMAP (which is now up to version 4).  And there's a host of value-added protocols (like what Exchange supports). 

    But now there's also web mail -- services that have their own HTTP interface for reading e-mail.  Some of the services have solid documentation; others don't, or actively prevent automated access.  Picking the services to support is quite difficult, too: a service might be the most popular in one country, but be essentially absent in a different country.

    Lastly, what exactly counts as email these days?  Would a facebook poke quality?  Or a snapchat?

    A good way forward is to find a third-party library that handles email to the provider you're interested in; it will probably get you going faster than any other way.  You can also try to make your own library to connect to the services you're interested in; it will almost certainly take longer to get started (and will have an ongoing requirement to keep them up to date), but you'll get more control over exactly what happens.


    Network Developer Experience Team (Microsoft)

    Friday, February 21, 2014 8:30 PM
  • Sorry, more information...  The email account is my Hotmail account.


    Yours

    Friday, February 21, 2014 9:46 PM
  • Hotmail (now outlook.com) supports IMAP and POP, as well as Exchange ActiveSync, so you can access your mail via those protocols either by using a 3rd party control which supports them or by talking to them directly.

    http://blogs.office.com/2013/09/12/outlook-com-now-has-imap/

    --Rob

    Saturday, February 22, 2014 3:26 AM
    Owner