<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to search IMAP in .NET</title>
	<atom:link href="http://www.lesnikowski.com/blog/how-to-search-imap-in-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lesnikowski.com/blog/how-to-search-imap-in-net/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-search-imap-in-net</link>
	<description>EMAIL IMAP POP3 SMTP FTP FTPS barcode components blog</description>
	<lastBuildDate>Mon, 23 Jan 2012 18:49:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Pawel Lesnikowski</title>
		<link>http://www.lesnikowski.com/blog/how-to-search-imap-in-net/#comment-53</link>
		<dc:creator>Pawel Lesnikowski</dc:creator>
		<pubDate>Tue, 06 Dec 2011 19:13:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.lesnikowski.com/blog/?p=181#comment-53</guid>
		<description>@Louie,

I&#039;m afraid that this may be a server bug (the search is done entirely on the IMAP server side).</description>
		<content:encoded><![CDATA[<p>@Louie,</p>
<p>I&#8217;m afraid that this may be a server bug (the search is done entirely on the IMAP server side).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Louie</title>
		<link>http://www.lesnikowski.com/blog/how-to-search-imap-in-net/#comment-52</link>
		<dc:creator>Louie</dc:creator>
		<pubDate>Mon, 05 Dec 2011 02:19:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.lesnikowski.com/blog/?p=181#comment-52</guid>
		<description>hi 

I have just tried to client.Search().Where(Expression.UID(Range.From(100))); it still return me the email with biggest uid on server (25). however, when i use rang.creat(26,100), it give me the correct result (no emails found).</description>
		<content:encoded><![CDATA[<p>hi </p>
<p>I have just tried to client.Search().Where(Expression.UID(Range.From(100))); it still return me the email with biggest uid on server (25). however, when i use rang.creat(26,100), it give me the correct result (no emails found).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pawel Lesnikowski</title>
		<link>http://www.lesnikowski.com/blog/how-to-search-imap-in-net/#comment-51</link>
		<dc:creator>Pawel Lesnikowski</dc:creator>
		<pubDate>Fri, 02 Dec 2011 11:04:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.lesnikowski.com/blog/?p=181#comment-51</guid>
		<description>@Louie

You can use Expression.UID method.
It allows you to select a range of uids you are interested in.

To search uids greater that a certain value:
[csharp]
List&lt;long&gt; uids = client.Search().Where(Expression.UID(Range.From(55)));
[/csharp]

To search uids in specified range (from 55 included to 135 included):
[csharp]
List&lt;long&gt; uids = client.Search().Where(Expression.UID(Range.Create(55, 135)));
[/csharp] </description>
		<content:encoded><![CDATA[<p>@Louie</p>
<p>You can use Expression.UID method.<br />
It allows you to select a range of uids you are interested in.</p>
<p>To search uids greater that a certain value:</p>
<pre class="brush: csharp;">
List&lt;long&gt; uids = client.Search().Where(Expression.UID(Range.From(55)));
</pre>
<p>To search uids in specified range (from 55 included to 135 included):</p>
<pre class="brush: csharp;">
List&lt;long&gt; uids = client.Search().Where(Expression.UID(Range.Create(55, 135)));
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Louie</title>
		<link>http://www.lesnikowski.com/blog/how-to-search-imap-in-net/#comment-50</link>
		<dc:creator>Louie</dc:creator>
		<pubDate>Fri, 02 Dec 2011 05:53:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.lesnikowski.com/blog/?p=181#comment-50</guid>
		<description>hi,

I am a web developer who is trying to implement a web mail as a part of the project that i am working on. it requires synchronous the local cache and imap server. would you please let me know how would I search mailbox by uid? (i need to search uid greater than a certain value) so that i can only download the email from server which haven&#039;t been downloaded yet.

many thanks

best regards

Louie</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>I am a web developer who is trying to implement a web mail as a part of the project that i am working on. it requires synchronous the local cache and imap server. would you please let me know how would I search mailbox by uid? (i need to search uid greater than a certain value) so that i can only download the email from server which haven&#8217;t been downloaded yet.</p>
<p>many thanks</p>
<p>best regards</p>
<p>Louie</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pawel Lesnikowski</title>
		<link>http://www.lesnikowski.com/blog/how-to-search-imap-in-net/#comment-49</link>
		<dc:creator>Pawel Lesnikowski</dc:creator>
		<pubDate>Tue, 08 Nov 2011 12:54:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.lesnikowski.com/blog/?p=181#comment-49</guid>
		<description>@Gonzo

The search is done entirely on the server side.
If the server implements search functionality incorrectly there is not much we can do.

Could you prepare a log file for us, so we can make sure that Mail.dll generates correct search query?</description>
		<content:encoded><![CDATA[<p>@Gonzo</p>
<p>The search is done entirely on the server side.<br />
If the server implements search functionality incorrectly there is not much we can do.</p>
<p>Could you prepare a log file for us, so we can make sure that Mail.dll generates correct search query?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gonzo</title>
		<link>http://www.lesnikowski.com/blog/how-to-search-imap-in-net/#comment-48</link>
		<dc:creator>Gonzo</dc:creator>
		<pubDate>Sun, 06 Nov 2011 10:33:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.lesnikowski.com/blog/?p=181#comment-48</guid>
		<description>When I  search for Expression.From(&quot;first name last name&quot;) - it finds the mail.

When I  search for Expression.From(&quot;name@domain.com&quot;) - it does not find the mail.

So, it appears to only search the display name of the from text, not the from email address.

Is there any way to search for the from email address?</description>
		<content:encoded><![CDATA[<p>When I  search for Expression.From(&#8220;first name last name&#8221;) &#8211; it finds the mail.</p>
<p>When I  search for Expression.From(&#8220;name@domain.com&#8221;) &#8211; it does not find the mail.</p>
<p>So, it appears to only search the display name of the from text, not the from email address.</p>
<p>Is there any way to search for the from email address?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pawel Lesnikowski</title>
		<link>http://www.lesnikowski.com/blog/how-to-search-imap-in-net/#comment-47</link>
		<dc:creator>Pawel Lesnikowski</dc:creator>
		<pubDate>Sat, 17 Sep 2011 06:54:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.lesnikowski.com/blog/?p=181#comment-47</guid>
		<description>Knut,

The expression you provided works exactlly like you want:
sentsince&gt;2011/09/01 &amp;&amp; (from == &quot;a.com&quot; &#124;&#124; from == &quot;b.com&quot;)</description>
		<content:encoded><![CDATA[<p>Knut,</p>
<p>The expression you provided works exactlly like you want:<br />
sentsince&gt;2011/09/01 &amp;&amp; (from == &#8220;a.com&#8221; || from == &#8220;b.com&#8221;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Knut Bøhn</title>
		<link>http://www.lesnikowski.com/blog/how-to-search-imap-in-net/#comment-46</link>
		<dc:creator>Knut Bøhn</dc:creator>
		<pubDate>Fri, 16 Sep 2011 08:30:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.lesnikowski.com/blog/?p=181#comment-46</guid>
		<description>Guess I&#039;m getting lost in all the brackets... - I need to put an Expression.Or first?</description>
		<content:encoded><![CDATA[<p>Guess I&#8217;m getting lost in all the brackets&#8230; &#8211; I need to put an Expression.Or first?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pawel Lesnikowski</title>
		<link>http://www.lesnikowski.com/blog/how-to-search-imap-in-net/#comment-45</link>
		<dc:creator>Pawel Lesnikowski</dc:creator>
		<pubDate>Thu, 15 Sep 2011 18:54:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.lesnikowski.com/blog/?p=181#comment-45</guid>
		<description>@Knut

Yes, it should work exactly like you put it (I just applied some formatting).</description>
		<content:encoded><![CDATA[<p>@Knut</p>
<p>Yes, it should work exactly like you put it (I just applied some formatting).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Knut Bøhn</title>
		<link>http://www.lesnikowski.com/blog/how-to-search-imap-in-net/#comment-44</link>
		<dc:creator>Knut Bøhn</dc:creator>
		<pubDate>Thu, 15 Sep 2011 12:24:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.lesnikowski.com/blog/?p=181#comment-44</guid>
		<description>Is it possible to nest multiple or expressions, to add more from-criteria to something like

[csharp]
List&lt;long&gt; uidList = imap.Search().Where(
	Expression.And(
		Expression.SentSince(DateTime.Parse(&quot;01.09.2011&quot;)),
		Expression.Or(
			Expression.From(&quot;a.com&quot;),
			Expression.From(&quot;b.com&quot;)
		) // or
	) // and
); // where
[/csharp]
?
in other words: where sentsince&gt;20110901 &amp;&amp; (from ==&quot;a.com&quot; &#124;&#124; from ==&quot;b.com&quot;&#124;&#124; from ==&quot;c.com&quot;) etc etc

Thanks,
knut</description>
		<content:encoded><![CDATA[<p>Is it possible to nest multiple or expressions, to add more from-criteria to something like</p>
<pre class="brush: csharp;">
List&lt;long&gt; uidList = imap.Search().Where(
	Expression.And(
		Expression.SentSince(DateTime.Parse(&quot;01.09.2011&quot;)),
		Expression.Or(
			Expression.From(&quot;a.com&quot;),
			Expression.From(&quot;b.com&quot;)
		) // or
	) // and
); // where
</pre>
<p>?<br />
in other words: where sentsince&gt;20110901 &amp;&amp; (from ==&#8221;a.com&#8221; || from ==&#8221;b.com&#8221;|| from ==&#8221;c.com&#8221;) etc etc</p>
<p>Thanks,<br />
knut</p>
]]></content:encoded>
	</item>
</channel>
</rss>

