<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog &#124; Limilabs &#187; Yahoo!</title>
	<atom:link href="http://www.limilabs.com/blog/tag/yahoo/feed" rel="self" type="application/rss+xml" />
	<link>http://www.limilabs.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 21 May 2012 09:49:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Free Yahoo! Mail via IMAP</title>
		<link>http://www.limilabs.com/blog/free-yahoo-mail-via-imap?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=free-yahoo-mail-via-imap</link>
		<comments>http://www.limilabs.com/blog/free-yahoo-mail-via-imap#comments</comments>
		<pubDate>Sun, 30 May 2010 09:59:33 +0000</pubDate>
		<dc:creator>Limilabs support</dc:creator>
				<category><![CDATA[Component]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[Mail.dll]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[Yahoo!]]></category>

		<guid isPermaLink="false">http://www.limilabs.com/blog/?p=911</guid>
		<description><![CDATA[Update: Mail.dll issues custom ID command automatically, when it recognize you are accessing yahoo server. It is possible to get direct Yahoo! IMAP access. Yahoo! operates IMAP servers (imap.mail.yahoo.com in particular), which are globally accessible. However they require a specific, but non-standard IMAP command to be sent before login is done. The command is: “ID [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.limilabs.com/blog/wp-content/uploads/2010/05/yahoo.gif" alt="" title="yahoo" width="142" height="38" class="alignleft size-full wp-image-917" /></p>
<p><strong>Update: Mail.dll issues custom ID command automatically, when it recognize you are accessing yahoo server.</strong></p>
<p>It is possible to get direct Yahoo! IMAP access.<br />
Yahoo! operates IMAP servers (imap.mail.yahoo.com in particular), which are globally accessible.<br />
However <strong>they require a specific, but non-standard IMAP command to be sent before login</strong> is done. The command is: “ID (&#8220;GUID&#8221; &#8220;1&#8243;)”</p>
<pre class="brush: csharp;">
// C#
imap.SendCommand(@&quot;ID (&quot;&quot;GUID&quot;&quot; &quot;&quot;1&quot;&quot;)&quot;);
</pre>
<pre class="brush: vb;">
' VB
imap.SendCommand(&quot;ID (&quot;&quot;GUID&quot;&quot; &quot;&quot;1&quot;&quot;)&quot;)
</pre>
<p>You can also use IMAP over SSL on the standard port 993.</p>
<p>Here&#8217;s the full <strong>C#</strong> version of the code:</p>
<pre class="brush: csharp;">
using (Imap imap = new Imap())
{
	imap.ConnectSSL(&quot;imap.mail.yahoo.com&quot;);

	// Not needed as Mail.dll is going to issue this command automatically
	// imap.SendCommand(@&quot;ID (&quot;&quot;GUID&quot;&quot; &quot;&quot;1&quot;&quot;)&quot;);

	imap.Login(&quot;user&quot;, &quot;password&quot;);

	imap.SelectInbox();
	List&lt;long&gt; uidList = imap.Search(Expression.All());
	foreach (long uid in uidList)
	{
		IMail email = new MailBuilder()
    			.CreateFromEml(imap.GetMessageByUID(uid));
		Console.WriteLine(email.Subject);
	}
	imap.Close();
}
</pre>
<p>and <strong>VB.NET</strong> version:</p>
<pre class="brush: vb;">
Using imap As New Imap()
	imap.ConnectSSL(&quot;imap.mail.yahoo.com&quot;)

	' Not needed as Mail.dll is going to issue this command automatically
	'imap.SendCommand(&quot;ID (&quot;&quot;GUID&quot;&quot; &quot;&quot;1&quot;&quot;)&quot;)

	imap.Login(&quot;user&quot;, &quot;password&quot;)

	imap.SelectInbox()
	Dim uidList As List(Of Long) = imap.Search(Expression.All())
	For Each uid As Long In uidList
		Dim email As IMail = New MailBuilder() _
			.CreateFromEml(imap.GetMessageByUID(uid))
		Console.WriteLine(email.Subject)
	Next
	imap.Close()
End Using
</pre>
<p>Yahoo&#8217;s IMAP server differences:<br />
- non-standard command ID command is required before any other command,<br />
- Examine explicitly requires CLOSE command (Imap.CloseCurrentFolder), otherwise subsequent SELECT (Imap.Select) has no effect and mailbox is still in read-only stat,<br />
-Yahoo does not support IDLE command,<br />
- SELECT for not existing folder does not create new folder.</p>
<p>You can download the latest version of <a href="http://www.limilabs.com/mail">Mail.dll .NET IMAP client here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.limilabs.com/blog/free-yahoo-mail-via-imap/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

