开发者

Retrieve E-mail from server (pop3) by date for filtering on subject or body in C#

开发者 https://www.devze.com 2023-02-02 03:52 出处:网络
I have a piece of monitoring software I am writing which needs to retrieve e-mails sent to an address for a certain day so that I can filter them by a regex in the subject or body.I don\'t need to ret

I have a piece of monitoring software I am writing which needs to retrieve e-mails sent to an address for a certain day so that I can filter them by a regex in the subject or body. I don't need to retrieve the entire message, only the subject and body for all messages on a given day so that I can evaluate them with a regular expression for a token.

I looked at EAGetMail as a solution, but their 开发者_StackOverflowimplementation doesn't do what I need to to do. I can only get all information on mail, which only has the size and index. I would need it by subject, but even then I don't want to get everything in inbox. If I went with this solution I have to get all mail, and then retrieve each mail message individually to evaluate the subject and body. This is not ideal.

I also looked at OpenPop.Net, but it too does not have a targeted retrieval for today's messages only.

Can I even do what I want without looping through every single email on the server until I find a match? What is the best way to accomplish what I am trying to do? Am I going to have to build a custom web request to get the data I want? Also, I looked at Chilkat, but I am looking for a free solution, even if it means building the http request myself.


dont know if this helps you at all because it is vb.net however, if you combine with the other link it may help.

http://www.codeproject.com/KB/smart/EmailClient.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号