Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
CurtGroen  
#1 Posted : Saturday, November 30, 2019 1:29:36 AM(UTC)
CurtGroen

Rank: Newbie

Groups: Registered
Joined: 11/26/2019(UTC)
Posts: 1
Canada
Location: edmonton

I'm using EAGetMail library to read emails from Gmail. This is my code:

Quote:
private void readMails(){
MailServer oServer=new MailServer("pop.gmail.com", "something@gmail.com", "noneedtoseethis", ServerProtocol.Pop3);
MailClient oClient = new MailClient("Client");
oServer.SSLConnection = true;
oServer.Port = 995;
try {
oClient.Connect(oServer);
MailInfo[] infos = oClient.GetMailInfos();
Console.WriteLine(infos.Length);
for (int i = 0; i < infos.Length; i++){
MailInfo info = infos[i];
Mail oMail = oClient.GetMail(info);

Console.WriteLine("From: {0}", oMail.From.ToString());
//oClient.Delete(info);
}
oClient.Quit();
} catch (Exception ep) {
Console.WriteLine(ep.Message);
}
}


Though it appears the only thing that it gets are the new messages I receive
which are 2 or 3 every five minutes.

But I want to read all emails I have in the inbox, not just the new coming messages
How can I do that?

Edited by moderator Sunday, December 1, 2019 8:17:25 PM(UTC)  | Reason: unnecessary external link is forbidden

ivan  
#2 Posted : Sunday, December 1, 2019 8:18:56 PM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,022

Thanks: 9 times
Was thanked: 41 time(s) in 41 post(s)
Please use IMAP protocol instead of POP protocol, then you can read all emails.

Retrieve emails from Gmail IMAP server
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.041 seconds.

EXPLORE TUTORIALS

© All Rights Reserved, AdminSystem Software Limited.