login about faq

Hi

I am trying to use imap.search in vs2012 c# to return a subset of emails using "FROM Brendan". The result is zero emails even though there are 3 emails in the account from Brendan. If I use "ALL" it returns the correct number which is the 8 test emails in the account inbox. Having copied the test emails to another email account on mail.com and using the exact same code I get the correct result of 3.

The code I used is from one of the examples and is:

Chilkat.MessageSet messageSet; // We can choose to fetch UIDs or sequence numbers. bool fetchUids; fetchUids = true;

            messageSet = imap.Search("FROM Brendan", fetchUids);
            if (messageSet == null)
            {
                MessageBox.Show(imap.LastErrorText);
                return;
            }

        // Fetch the email headers into a bundle object:
            Chilkat.EmailBundle bundle;
            bundle = imap.FetchHeaders(messageSet);
            if (bundle == null)
            {

                MessageBox.Show(imap.LastErrorText);
                return;
            }

Do I need to do something differently for aol accounts?

Thanks for your help.

Joe

asked May 12 '13 at 10:53

joecapaldi's gravatar image

joecapaldi
1111


Set the imap.KeepSessionLog property = true, then examine the contents of the imap.SessionLog property.

link

answered May 13 '13 at 16:39

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×175
×13
×2

Asked: May 12 '13 at 10:53

Seen: 2,112 times

Last updated: May 13 '13 at 16:39

powered by OSQA