How to use POPRetriever FindFirstPOPRetreiver

miguelth
Posts: 6
Joined: Wed Oct 14, 2015 1:57 pm
Location: Québec, Canada

How to use POPRetriever FindFirstPOPRetreiver

Postby miguelth » Wed Oct 14, 2015 6:48 pm

Hello,

I try to get the list of my POPRetriever under a Mailbox but I always get nothing.

This is my code :

Code: Select all

public static void ListPop(Postoffice postOffice, Mailbox mailbox)
  {
    var popRetriever = new POPRetriever() { LocalPostoffice = postOffice.Account, LocalMailbox = mailbox.MailboxName };
   
    var returnValue = popRetriever.FindFirstPOPRetreiver();

    while (returnValue == 1)
    {
      Debug.WriteLine(popRetriever.MailServer);
      returnValue = popRetriever.FindNextPOPRetreiver();
    }
  }


Thank,
Miguel

miguelth
Posts: 6
Joined: Wed Oct 14, 2015 1:57 pm
Location: Québec, Canada

Re: How to use POPRetriever FindFirstPOPRetreiver

Postby miguelth » Thu Oct 15, 2015 12:44 pm

var popRetriever = new POPRetriever()
{
LocalPostoffice = postOffice.Account,
LocalMailbox = mailbox.MailboxName,
APOP = -1,
CheckEvery = -1,
DownloadNewOnly = -1,
LastUsed = -1,
LeaveOnServer = -1,
Port = -1,
Status = -1
};

var returnValue = popRetriever.FindFirstPOPRetreiver();

while (returnValue == 1)
{
Debug.WriteLine("\t" + popRetriever.MailServer + "\t" + popRetriever.UserName + "\t" + popRetriever.Password);

popRetriever.APOP = -1;
popRetriever.CheckEvery = -1;
popRetriever.DownloadNewOnly = -1;
popRetriever.LastUsed = -1;
popRetriever.LeaveOnServer = -1;
popRetriever.Port = -1;
popRetriever.Status = -1;
popRetriever.DownloadedMessagesFile = "";
popRetriever.MailServer = "";
popRetriever.Password = "";
popRetriever.UserName = "";
returnValue = popRetriever.FindNextPOPRetreiver();
}

Who is online

Users browsing this forum: No registered users and 2 guests