Query Mailbox in C# (.NET 2.0)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I need to search (Subject) eMails in a specific Mailbox.
After I have found a mail I need to be able to
detach the attachements ....
What is the best practice to do this?

It has to work without Outlook being installed.

Thanks for any comment.

Best regards
Frank Uray
 
Hi

Thanks for this good tip !

There is just one more little question:
Did you ever use this?
Do you know how I can find out if the mail message
is unread or not??

Would be happy for a answer.

Best regards
Frank Uray
 
I used it to poll and clean a mailbox dedicated to specific notification
emails. The code cycles through the messages processing those it recognises
and deleting those it doesn't (spam)

I was (maybe mistakenly) under the impression that the read/unread property
wasn't a part of the Pop3 protocol, if it is I'll be a charred crisp in a
few minutes.

The Pop3 classes I suggested don't allow much apart from message counting,
message content and the ability to delete mails - so it assumes that a
message found in the Inbox is unread. You could read messages and make
copies of any interesting ones (e.g. in a database) then make sure that you
delete the messages at the end of the run - otherwise messages would be
processed over and over.

N.B. Deletes are transactionally processed and committed by the
..CloseConnection() method
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top