Read unread mails from gmail using C#.net
Feb 25, 2017 · 1 min read
String response;
System.Net.WebClient wc = new System.Net.WebClient();
wc.Credentials = new System.Net.NetworkCredential(“Username”,”Password”);
response = Encoding.UTF8.GetString(wc.DownloadData(“https://mail.google.com/mail/feed/atom"));
response = response.Replace(“<feed version=0.3 xmlns=http://purl.org/atom/ns#>", “<feed>”);
MessageBox.Show(response);
