Sadly there is no official ASP.NET document or a sample project for downloading the emails from the email server; such as Gmail or Outlook. They just created a helper class WebMail for sending the emails through any SMTP server; including Gmail.
Anyways, you can try using these settings from
this web page[
^] (Google Help) and then try creating a WebClient and pass these settings while downloading the streams from the Gmail servers. Hopefully that would do the job for your project. I am also unaware of any ASP.NET sample IMAP client that I might share here for you. But since ASP.NET runs over .NET, you might want to use these libraries in the backend and show their responses in the HTML format in ASP.NET.
http://stackoverflow.com/a/1524173/1762944[
^]
https://www.nuget.org/packages/S22.Imap/[
^]