<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Albert Pascual ASP.NET Blog</title><link>http://weblogs.asp.net/albertpascual/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Pre-order on Amazon: Developing Service-Oriented AJAX Applications on the Microsoft® Platform</title><link>http://weblogs.asp.net/albertpascual/archive/2008/07/14/pre-order-on-amazon-developing-service-oriented-ajax-applications-on-the-microsoft-174-platform.aspx</link><pubDate>Tue, 15 Jul 2008 06:31:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6400704</guid><dc:creator>albertpascual</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6400704</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/07/14/pre-order-on-amazon-developing-service-oriented-ajax-applications-on-the-microsoft-174-platform.aspx#comments</comments><description>&lt;p&gt;&lt;img src="http://ecx.images-amazon.com/images/I/51nLvnV4NTL._SL500_AA240_.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;A must have book if you use MS AJAX on your web applications be on the UpdatePanel. Mr. &lt;a href="http://daniellarson.spaces.live.com/Blog/cns!D3543C5837291E93!2287.entry"&gt;Daniel Larson&lt;/a&gt; wrote the amazing book. Great reference guide as a good general real to understand MS AJAX.&lt;/p&gt;  &lt;p&gt;Cheers&lt;/p&gt;  &lt;p&gt;Al&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6400704" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/albertpascual/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/AJAX/default.aspx">AJAX</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/Books/default.aspx">Books</category></item><item><title>How to update your iPhone to the new version 2.0</title><link>http://weblogs.asp.net/albertpascual/archive/2008/07/10/how-to-update-your-iphone-to-the-new-version-2-0.aspx</link><pubDate>Fri, 11 Jul 2008 04:53:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6386335</guid><dc:creator>albertpascual</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6386335</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/07/10/how-to-update-your-iphone-to-the-new-version-2-0.aspx#comments</comments><description>&lt;p&gt;The new version of the iPhone 2.0 is here. But Apple hasn’t made it available via iTunes as normally has. Maybe tomorrow morning? In any case, you don’t want to wait any longer. I don’t blame you, I didn’t. I downloaded the new version from Apple (225MB file) and I install it without any issue.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Note: This update will erase all your data, so use a testing iPhone, not your personal one. The final update should be available tomorrow morning from Apple as well as a new version of the iTunes software. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Make sure your iPhone is not unlock. People claims if your iPhone is unlock will brick it for you! Again, nice feature Apple!.&lt;/p&gt;  &lt;p&gt;You can download the version 2.0 from the link below.&lt;/p&gt;  &lt;p&gt;&lt;a title="" href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-"&gt;download 2.0 here&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="" href="http://www.apple.com/support/downloads/itunes77.html"&gt;Or Download the new iTunes &lt;/a&gt;that supports iPhone 3G and iPhone 2.0 then click the Update button.&lt;/p&gt;  &lt;p&gt;Because I only have one iPhone I am restored it back to my previous version as I need my contacts, emails and pictures. I’ll be updating with the official release only, so I can keep my personal data.&lt;/p&gt;  &lt;p&gt;Cheers&lt;/p&gt;  &lt;p&gt;Al&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6386335" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/albertpascual/archive/tags/iPhone/default.aspx">iPhone</category></item><item><title>Microsoft MVP Award renewed!</title><link>http://weblogs.asp.net/albertpascual/archive/2008/07/02/microsoft-mvp-award-renewed.aspx</link><pubDate>Wed, 02 Jul 2008 12:06:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6350564</guid><dc:creator>albertpascual</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6350564</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/07/02/microsoft-mvp-award-renewed.aspx#comments</comments><description>&lt;p&gt;I received THE email this morning from my MVP Lead: &lt;/p&gt;  &lt;p&gt;&lt;em&gt;“Dear Albert Pascual, &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Congratulations! We are pleased to present you with the 2008 Microsoft® MVP Award! The MVP Award is our way to say thank you for promoting the spirit of community and improving people’s lives and the industry’s success every day. We appreciate your extraordinary efforts in ASP/ASP.NET technical communities during the past year.(…)”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/albertpascual/WindowsLiveWriter/MicrosoftMVPAwardrenewed_75E5/MVP_FullColor_ForScreen_2.png"&gt;&lt;img title="MVP_FullColor_ForScreen" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="MVP_FullColor_ForScreen" src="http://weblogs.asp.net/blogs/albertpascual/WindowsLiveWriter/MicrosoftMVPAwardrenewed_75E5/MVP_FullColor_ForScreen_thumb.png" width="157" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Being an MVP allows you to be part of a great, intelligent group of people as well as tap on resources that otherwise you would never have access to. I believe last year I was able to learn more than any year previously. This year I am committed to take this award to its limits again. Help the .NET community as well as improve myself and the ones around me.&lt;/p&gt;  &lt;p&gt;Thanks again Microsoft for this great opportunity as well thanks to my MVP Lead Suzanna Moran for your patience and support.&lt;/p&gt;  &lt;p&gt;Cheers&lt;/p&gt;  &lt;p&gt;Al&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6350564" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/albertpascual/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/MVP/default.aspx">MVP</category></item><item><title>Speaking at the Inland Empire User Group</title><link>http://weblogs.asp.net/albertpascual/archive/2008/06/30/speaking-at-the-inland-empire-user-group.aspx</link><pubDate>Tue, 01 Jul 2008 06:12:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6341664</guid><dc:creator>albertpascual</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6341664</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/06/30/speaking-at-the-inland-empire-user-group.aspx#comments</comments><description>&lt;p&gt;July 8th I’ll be presenting &lt;a href="http://geotwitter.net"&gt;http://geotwitter.net&lt;/a&gt; at the &lt;a title="" href="http://www.iedotnetug.org/UG/"&gt;Inland Empire User G&lt;/a&gt;roups. I don’t have a power point presentation yet for &lt;a href="http://geotwitter.net"&gt;GeoTwitter&lt;/a&gt;. Right now I show the website and each part of the code as well as how to connect to the C&lt;a href="http://codeplex.com/geotwitter"&gt;odePlex&lt;/a&gt; to download the latest and greatest. However there isn’t Internet access at the IEUG.&lt;/p&gt;  &lt;p&gt;Looks like I’ll be working on july 7th to create a presentation. If you are around SoCal on july 8th stop by.&lt;/p&gt;  &lt;p&gt;Hopefully be then, GeoTwitter will include support to cross post to &lt;a href="http://pownce.com/"&gt;Pownce&lt;/a&gt; and &lt;a href="http://jaiku.com/"&gt;Jaiku&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Cheers&lt;/p&gt;  &lt;p&gt;Al&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6341664" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/albertpascual/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/Geo+Twitter/default.aspx">Geo Twitter</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/IEUG/default.aspx">IEUG</category></item><item><title>ArcGIS 9.3 has was release today</title><link>http://weblogs.asp.net/albertpascual/archive/2008/06/26/arcgis-9-3-has-was-release-today.aspx</link><pubDate>Fri, 27 Jun 2008 06:26:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6323127</guid><dc:creator>albertpascual</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6323127</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/06/26/arcgis-9-3-has-was-release-today.aspx#comments</comments><description>&lt;p&gt;ArcGIS 9.3 Release comes with loads of online resources for anybody to get up to speed fast:&lt;/p&gt;  &lt;p&gt;What’s new on &lt;a href="http://www.esri.com/software/arcgis/about/whats-new.html"&gt;ArcGIS 9.3&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Watch the &lt;a href="http://www.esri.com/flashmedia/arcgis_desktop_93/arcgis_desktop_93.html"&gt;presentation here.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Documentation can be &lt;a href="http://resources.esri.com/gateway/index.cfm"&gt;found here.&lt;/a&gt; With great ADF and JavaScript samples.&lt;/p&gt;  &lt;p&gt;You’ll find online demos that will &lt;a href="http://www.esri.com/software/arcgis/arcgisserver/about/demos.html"&gt;speed up your development&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can submit your project and &lt;a href="http://resources.esri.com/showcase/"&gt;share it with the world.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Need help? Use &lt;a href="http://support.esri.com/index.cfm?fa=forums.gateway"&gt;the user Forums.&lt;/a&gt; Become an &lt;a href="http://forums.esri.com/help/help.asp?c=93#mvp"&gt;ESRI MVP&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Introduction to &lt;a href="http://vid01.esri.com/winmmedia/server06.wmv"&gt;ArcGIS Server.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Microsoft Visual Studio 2005 and 2008 are supported. &lt;/p&gt;  &lt;p&gt;My &lt;a href="http://alpascual.com/blog/al/archive/2008/06/25/hospital-implements-high-tech-emergency-response-system.aspx"&gt;latest project release&lt;/a&gt; was created using ArcGIS Server 9.3 with the JavaScript API. &lt;/p&gt;  &lt;p&gt;Cheers&lt;/p&gt;  &lt;p&gt;Al&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6323127" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/albertpascual/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/ESRI/default.aspx">ESRI</category></item><item><title>Hospital Implements High-Tech Emergency Response System</title><link>http://weblogs.asp.net/albertpascual/archive/2008/06/25/hospital-implements-high-tech-emergency-response-system.aspx</link><pubDate>Thu, 26 Jun 2008 06:10:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6320791</guid><dc:creator>albertpascual</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6320791</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/06/25/hospital-implements-high-tech-emergency-response-system.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;The project I develop is in the news today:&lt;/p&gt;  &lt;p&gt;From Information Week:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“GPS-enabled &lt;/em&gt;&lt;a href="http://www.techweb.com/encyclopedia/defineterm.jhtml?term=cell phones&amp;amp;x=&amp;amp;y="&gt;&lt;em&gt;cell phones&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and other mobile location-tracking technologies used for Enhanced 911 capabilities are helping emergency response workers find people in trouble. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;The deployment of a geographic &lt;/em&gt;&lt;a href="http://www.techweb.com/encyclopedia/defineterm.jhtml?term=information system&amp;amp;x=&amp;amp;y="&gt;&lt;em&gt;information system&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and mobile applications in southern California is enabling emergency response personnel to more quickly and efficiently deploy rescue teams based on near real-time data about traffic conditions, the location of nearby ambulances and helicopters, and other factors, such as bed availability at area hospitals. “&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Read The whole article here: &lt;a href="http://www.informationweek.com/news/personal_tech/gps/showArticle.jhtml?articleID=208800864"&gt;Information Week Article&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Cheers&lt;/p&gt;  &lt;p&gt;Al&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6320791" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/albertpascual/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/JavaScript/default.aspx">JavaScript</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/ESRI/default.aspx">ESRI</category></item><item><title>UDP Packet Generator</title><link>http://weblogs.asp.net/albertpascual/archive/2008/06/24/udp-packet-generator.aspx</link><pubDate>Wed, 25 Jun 2008 06:18:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6317352</guid><dc:creator>albertpascual</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6317352</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/06/24/udp-packet-generator.aspx#comments</comments><description>&lt;p&gt;Tonight I need a UDP Packet generator, so I thought just to paste it here so I can help anybody looking for something like that. I have a few files I want to transfer using UDP to another machine. Remember that UDP does not warranty delivery.&lt;/p&gt;  &lt;p&gt;Change the localhost to the destination IP as well as the destination port number.&lt;/p&gt;  &lt;pre class="code"&gt;System.Net.Sockets.&lt;span style="color: #2b91af"&gt;UdpClient &lt;/span&gt;client = &lt;span style="color: blue"&gt;new &lt;/span&gt;System.Net.Sockets.&lt;span style="color: #2b91af"&gt;UdpClient&lt;/span&gt;();

            client.Connect(&lt;span style="color: #a31515"&gt;&amp;quot;localhost&amp;quot;&lt;/span&gt;, 601);

            System.IO.&lt;span style="color: #2b91af"&gt;DirectoryInfo &lt;/span&gt;info = &lt;span style="color: blue"&gt;new &lt;/span&gt;System.IO.&lt;span style="color: #2b91af"&gt;DirectoryInfo&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;C:\\temp\\udp&amp;quot;&lt;/span&gt;);
            System.IO.&lt;span style="color: #2b91af"&gt;FileInfo &lt;/span&gt;[] fileInfo = info.GetFiles();

            &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(System.IO.&lt;span style="color: #2b91af"&gt;FileInfo &lt;/span&gt;inf &lt;span style="color: blue"&gt;in &lt;/span&gt;fileInfo)
            {
                &lt;span style="color: blue"&gt;string &lt;/span&gt;filePath = inf.FullName;

                &lt;span style="color: #2b91af"&gt;StreamReader &lt;/span&gt;readStream = System.IO.&lt;span style="color: #2b91af"&gt;File&lt;/span&gt;.OpenText(filePath);

                &lt;span style="color: blue"&gt;byte &lt;/span&gt;[] stre = System.Text.&lt;span style="color: #2b91af"&gt;Encoding&lt;/span&gt;.Unicode.GetBytes(readStream.ReadToEnd());

                readStream.Close();

                client.Send(stre, stre.Length);
            }

            client.Close();&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;

&lt;p&gt;Al&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6317352" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/albertpascual/archive/tags/Code/default.aspx">Code</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/Sockets/default.aspx">Sockets</category></item><item><title>Best practices for using LINQ to SQL on your existing web applications.</title><link>http://weblogs.asp.net/albertpascual/archive/2008/06/19/best-practices-for-using-linq-to-sql-on-your-existing-web-applications.aspx</link><pubDate>Fri, 20 Jun 2008 05:31:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6298097</guid><dc:creator>albertpascual</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6298097</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/06/19/best-practices-for-using-linq-to-sql-on-your-existing-web-applications.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;Previously I have been talking about the &lt;a href="http://alpascual.com/blog/al/archive/2008/05/01/why-there-is-still-a-limitation-in-linq-to-sql.aspx"&gt;limitations of Linq to SQL&lt;/a&gt; for your data layer. You should read it &lt;a href="http://alpascual.com/blog/al/archive/2008/05/01/why-there-is-still-a-limitation-in-linq-to-sql.aspx"&gt;here&lt;/a&gt;. This post is part of the Linq to SQL &lt;a href="http://alpascual.com/blog/al/archive/tags/LINQ+to+SQL/default.aspx"&gt;series&lt;/a&gt;. Linq to SQL is a great technology I found that adding the data layer on the web application will just work until you are deploying the application to another computer with another database.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font color="#0080ff"&gt;Mixing 2.0 Web app with 3.5 LINQ to SQL&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;         SavedDataContext &lt;/span&gt;context = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SavedDataContext&lt;/span&gt;(_ConnectionString);
           
            &lt;span style="color: blue"&gt;var &lt;/span&gt;result = &lt;span style="color: blue"&gt;from &lt;/span&gt;c &lt;span style="color: blue"&gt;in &lt;/span&gt;context.viewerContexts
                         &lt;span style="color: blue"&gt;where &lt;/span&gt;c.UserID == userName
                         &lt;span style="color: blue"&gt;select new
                         &lt;/span&gt;{
                             Name = c.Name,
                             ID = c.ID,
                         };

            &lt;span style="color: #2b91af"&gt;DataTable &lt;/span&gt;dt = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataTable&lt;/span&gt;();
            dt.Columns.Add(&lt;span style="color: #a31515"&gt;&amp;quot;ID&amp;quot;&lt;/span&gt;);
            dt.Columns.Add(&lt;span style="color: #a31515"&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;);

            &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(&lt;span style="color: blue"&gt;var &lt;/span&gt;item &lt;span style="color: blue"&gt;in &lt;/span&gt;result)
            {               
                &lt;span style="color: #2b91af"&gt;DataRow &lt;/span&gt;row = dt.NewRow();
                row[&lt;span style="color: #a31515"&gt;&amp;quot;ID&amp;quot;&lt;/span&gt;] = item.ID;
                row[&lt;span style="color: #a31515"&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;] = item.Name;
                dt.Rows.Add(row);
            }

            &lt;span style="color: blue"&gt;return &lt;/span&gt;dt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font color="#0080ff"&gt;Problems with Connection Strings.&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you create the LINQ to SQL on the web application, by now you realized that deploying it is not a good option, as the connection string is embedded in the code. If you created a class library then you are save, just override the connection string in the web.config:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;     &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;connectionStrings&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;AssemblyName.Properties.Settings.MyConnectionString&lt;/span&gt;&amp;quot;
            &lt;span style="color: red"&gt;connectionString&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Data Source=myserver;Initial Catalog=mydatabase_TEST;Persist Security Info=True;User ID=myuserid;Password=mypassword&lt;/span&gt;&amp;quot;
            &lt;span style="color: red"&gt;providerName&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Data.SqlClient&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;connectionStrings&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font color="#0080ff"&gt;Xml converting types.&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you create a column on SQL as a xml, LINQ to SQL will convert that column as an XElement looks like instead of a string. If you try to set that element from a string you’ll get the error:&lt;/p&gt;

&lt;p&gt;Cannot implicitly convert type 'string' to 'System.Xml.Linq.XElement' &lt;/p&gt;

&lt;p&gt;So you’ll have to set the content as: Viewer.Element.Add(Mycontent);&lt;/p&gt;

&lt;p&gt;Maybe this is smart to only allow you to pass a XElement instead of string, the validation is done in your code instead of raising an exception.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font color="#0080ff"&gt;Summary.&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The wonderful world of LINQ to SQL is getting better every day. It’s time to jump into the code to start creating your own data layer as a Class Library in 3.5. You won’t have to convert the web application to 3.5, just make sure to return objects supported by framework 2.0.&lt;/p&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;
&lt;span class="sbmLink"&gt;
  &lt;table cellspacing="1" cellpadding="1"&gt;&lt;tbody&gt;
      &lt;tr&gt;
        &lt;td class="sbmText"&gt;Share this post : &lt;/td&gt;

        &lt;td class="sbmDim" onmouseover="mOvr(this)" onmouseout="mOut(this)"&gt;&lt;a class="sbmDim" onmouseover="mOvr(this)" title="Post it to del.icio.us" onmouseout="mOut(this)" href="http://del.icio.us/post?url=http://alpascual.com/blog/al&amp;amp;;title=Al's Blog" target="_blank"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/deliciou4.png" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;

        &lt;td class="sbmDim" onmouseover="mOvr(this)" onmouseout="mOut(this)"&gt;&lt;a class="sbmDim" onmouseover="mOvr(this)" title="Post it to digg" onmouseout="mOut(this)" href="http://digg.com/submit?phase=2&amp;amp;url=http://alpascual.com/blog/al&amp;amp;title=Al's Blog" target="_blank"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/digg14.png" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;

        &lt;td class="sbmDim" onmouseover="mOvr(this)" onmouseout="mOut(this)"&gt;&lt;a class="sbmDim" onmouseover="mOvr(this)" title="Post it to live" onmouseout="mOut(this)" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://alpascual.com/blog/al&amp;amp;title=Al's Blog" target="_blank"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/live4.png" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;

        &lt;td class="sbmDim" onmouseover="mOvr(this)" onmouseout="mOut(this)"&gt;&lt;a class="sbmDim" onmouseover="mOvr(this)" title="Post it to technorati!" onmouseout="mOut(this)" href="http://technorati.com/faves/?add=http://alpascual.com/blog/al&amp;amp;title=Al's Blog" target="_blank"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/technora4.png" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;&lt;/table&gt;
&lt;/span&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6298097" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/albertpascual/archive/tags/Code/default.aspx">Code</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/LINQ+to+SQL/default.aspx">LINQ to SQL</category></item><item><title>And the free MSDN Subscription goes to …</title><link>http://weblogs.asp.net/albertpascual/archive/2008/06/16/and-the-free-msdn-subscription-goes-to.aspx</link><pubDate>Tue, 17 Jun 2008 06:27:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6283522</guid><dc:creator>albertpascual</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6283522</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/06/16/and-the-free-msdn-subscription-goes-to.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt; &lt;span class="sbmLink"&gt;   &lt;table cellspacing="1" cellpadding="1"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td class="sbmText"&gt;Share this post : &lt;/td&gt;          &lt;td class="sbmDim" onmouseover="mOvr(this)" onmouseout="mOut(this)"&gt;&lt;a class="sbmDim" onmouseover="mOvr(this)" title="Post it to del.icio.us" onmouseout="mOut(this)" href="http://del.icio.us/post?url=http://alpascual.com/blog/al/archive/2008/06/16/and-the-free-msdn-subscription-goes-to.aspx&amp;amp;;title=And the free MSDN subscription goes to" target="_blank"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/deliciou4.png" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;          &lt;td class="sbmDim" onmouseover="mOvr(this)" onmouseout="mOut(this)"&gt;&lt;a class="sbmDim" onmouseover="mOvr(this)" title="Post it to digg" onmouseout="mOut(this)" href="http://digg.com/submit?phase=2&amp;amp;url=http://alpascual.com/blog/al/archive/2008/06/16/and-the-free-msdn-subscription-goes-to.aspx&amp;amp;title=And the free MSDN subscription goes to" target="_blank"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/digg14.png" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;          &lt;td class="sbmDim" onmouseover="mOvr(this)" onmouseout="mOut(this)"&gt;&lt;a class="sbmDim" onmouseover="mOvr(this)" title="Post it to live" onmouseout="mOut(this)" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;mkt=en-us&amp;amp;url=http://alpascual.com/blog/al/archive/2008/06/16/and-the-free-msdn-subscription-goes-to.aspx&amp;amp;title=And the free MSDN subscription goes to" target="_blank"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/live4.png" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;          &lt;td class="sbmDim" onmouseover="mOvr(this)" onmouseout="mOut(this)"&gt;&lt;a class="sbmDim" onmouseover="mOvr(this)" title="Post it to technorati!" onmouseout="mOut(this)" href="http://technorati.com/faves/?add=http://alpascual.com/blog/al/archive/2008/06/16/and-the-free-msdn-subscription-goes-to.aspx&amp;amp;title=And the free MSDN subscription goes to" target="_blank"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/technora4.png" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/span&gt;  &lt;p&gt;I spent this weekend looking at all the submission from all around the world. I finally narrow it down to 5 people that in my mind and opinion, even maybe wrong, they deserve the Premium MSDN subscription. I was looking for a person that could use the MSDN subscription for the community and will improve the skills of the people around him. Somebody that helps and volunteers in the .NET world. &lt;/p&gt;  &lt;p&gt;After a huge consideration as in my opinion many of the people emailing me should receive a Free MSDN subscription, at the end I have to select a winner!&lt;/p&gt;  &lt;p&gt;And the free MSDN subscription goes to … &lt;a href="http://dotnetstories.wordpress.com/"&gt;Nikolaos Kantzelis&lt;/a&gt;&lt;strong&gt; &lt;/strong&gt;you can read his blog &lt;a href="http://dotnetstories.wordpress.com/"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Thanks everybody for emailing me. Because you didn’t win does not mean you were not the best to receive this free MSDN subscription as I am not the best person to make a choice like that I’ve learned. &lt;/p&gt;  &lt;p&gt;Cheers&lt;/p&gt;  &lt;p&gt;Al&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6283522" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/albertpascual/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/MSDN/default.aspx">MSDN</category></item><item><title>Code Collection: Old code for retriving emails using POP3</title><link>http://weblogs.asp.net/albertpascual/archive/2008/06/14/code-collection-old-code-for-retriving-emails-using-pop3.aspx</link><pubDate>Sat, 14 Jun 2008 18:40:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6275555</guid><dc:creator>albertpascual</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6275555</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/06/14/code-collection-old-code-for-retriving-emails-using-pop3.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;&amp;nbsp;Looking still around my hard disk I am finding lots of code that I didn't know I had, I hope somebody can use it. This code is to handle email POP3.&lt;/P&gt;
&lt;P mce_keep="true"&gt;//&lt;BR&gt;// To do&lt;BR&gt;// Extracting mail attachment, and supporting differenet mime types and content&lt;BR&gt;// types.&lt;BR&gt;//------------------------------------------------------------------------------&lt;/P&gt;
&lt;P mce_keep="true"&gt;using System;&lt;BR&gt;using System.Net;&lt;BR&gt;using System.Net.Sockets;&lt;BR&gt;using System.IO;&lt;BR&gt;using System.Collections;&lt;BR&gt;using System.Text;&lt;/P&gt;
&lt;P mce_keep="true"&gt;namespace SuperJockey&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;class MailMessage&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string contentType;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string contentTransferEncoding;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string message;&lt;BR&gt;&amp;nbsp;};&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;public class MailHeader&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;public int number;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public int size;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string received;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string received2;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string received3;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string from;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string to;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string subject;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string date;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string messageID;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string mimeVersion;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string contentType;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string boundary;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string X_Priority;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string X_MSMail_Priority;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string X_Mailer;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string importance;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string X_MimeOLE;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string X_RCPT_TO;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string X_UIDL;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string status;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;public ArrayList messages;&lt;BR&gt;&amp;nbsp;};&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;/// Minimal POP3 Commands:&lt;BR&gt;&amp;nbsp;/// &lt;BR&gt;&amp;nbsp;/// USER name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; valid in the AUTHORIZATION state&lt;BR&gt;&amp;nbsp;/// PASS string&lt;BR&gt;&amp;nbsp;/// QUIT&lt;BR&gt;&amp;nbsp;/// &lt;BR&gt;&amp;nbsp;/// STAT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; valid in the TRANSACTION state&lt;BR&gt;&amp;nbsp;/// LIST [msg]&lt;BR&gt;&amp;nbsp;/// RETR msg&lt;BR&gt;&amp;nbsp;/// DELE msg&lt;BR&gt;&amp;nbsp;/// NOOP&lt;BR&gt;&amp;nbsp;/// RSET&lt;BR&gt;&amp;nbsp;/// QUIT&lt;BR&gt;&amp;nbsp;/// &lt;BR&gt;&amp;nbsp;/// Optional POP3 Commands:&lt;BR&gt;&amp;nbsp;/// APOP name digest&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; valid in the AUTHORIZATION state&lt;BR&gt;&amp;nbsp;/// TOP msg n&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; valid in the TRANSACTION state&lt;BR&gt;&amp;nbsp;/// UIDL [msg]&lt;BR&gt;&amp;nbsp;/// &lt;BR&gt;&amp;nbsp;/// POP3 Replies:&lt;BR&gt;&amp;nbsp;/// +OK&lt;BR&gt;&amp;nbsp;/// -ERR&lt;BR&gt;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;class MailPOP3&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;// variables for pop3 class&lt;BR&gt;&amp;nbsp;&amp;nbsp;public TcpClient tcpClient;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public NetworkStream netStream;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public StreamReader&amp;nbsp; streamReader;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Connect and authorized user.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="pop3host"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Pop3 Mailserver&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="port"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Port of the mailserver, normaly 110&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="user"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// a string identifying a mailbox (required), which is of&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// significance ONLY to the server&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="pwd"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// a server/mailbox-specific password (required)&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string DoConnect(string pop3host,int port, string user, string pwd)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// create POP3 connection&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tcpClient = new TcpClient(pop3host,port);&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// initialization&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;netStream = tcpClient.GetStream();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;streamReader = new StreamReader(tcpClient.GetStream());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string retVal = streamReader.ReadLine();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(!retVal.StartsWith("+OK"))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return retVal;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// send login&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;retVal = SendCommand("USER "+ user + "\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Possible Responses:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// +OK name is a valid mailbox&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// -ERR never heard of mailbox name&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(!retVal.StartsWith("+OK"))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return retVal;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// send password&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Possible Responses:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// +OK maildrop locked and ready&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// -ERR invalid password&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// -ERR unable to lock maildrop&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return SendCommand("PASS " + pwd + "\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;catch(Exception err)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return ("-ERR " + err.ToString());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Send a command to the pop3 server&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="command"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// command string&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;string SendCommand(string command)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;byte[] bData = System.Text.Encoding.ASCII.GetBytes(command.ToCharArray());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;netStream.Write(bData,0,bData.Length);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return streamReader.ReadLine();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;catch (Exception err)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return ("-ERR " + err.ToString());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="command"&amp;gt;&amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string GetCommandBlock(string command)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;StringBuilder CommandBlock = new StringBuilder();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string sTemp = SendCommand(command);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(sTemp.StartsWith("+OK")) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;do&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CommandBlock.Append(sTemp+"\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sTemp = streamReader.ReadLine();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}while(sTemp != ".");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return sTemp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;catch(Exception err)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return ("-ERR " + err.ToString());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return CommandBlock.ToString();&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Restrictions:&lt;BR&gt;&amp;nbsp;&amp;nbsp;///&amp;nbsp; may only be given in the TRANSACTION state&lt;BR&gt;&amp;nbsp;&amp;nbsp;///&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// The POP3 server issues a positive response with a line&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// containing information for the maildrop.&amp;nbsp; This line is&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// called a "drop listing" for that maildrop.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// In order to simplify parsing, all POP3 servers are&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// required to use a certain format for drop listings.&amp;nbsp; The&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// positive response consists of "+OK" followed by a single&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// space, the number of messages in the maildrop, a single&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// space, and the size of the maildrop in octets.&amp;nbsp; This memo&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// makes no requirement on what follows the maildrop size.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Minimal implementations should just end that line of the&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// response with a CRLF pair.&amp;nbsp; More advanced implementations&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// may include other information.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// NOTE: This memo STRONGLY discourages implementations&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// from supplying additional information in the drop&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// listing.&amp;nbsp; Other, optional, facilities are discussed&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// later on which permit the client to parse the messages&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// in the maildrop.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Note that messages marked as deleted are not counted in&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// either total.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Possible Responses:&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// +OK nn mm&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string GetStat()&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Send STAT command to get number of mail and total size&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return SendCommand("STAT\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;public string GetList()// Send LIST command with no parametrs to get all information&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// For saving 'list' results&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return GetCommandBlock("LIST\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Restrictions: &lt;BR&gt;&amp;nbsp;&amp;nbsp;///&amp;nbsp;&amp;nbsp; may only be given in the TRANSACTION state&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &lt;BR&gt;&amp;nbsp;&amp;nbsp;/// If an argument was given and the POP3 server issues a&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// positive response with a line containing information for&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// that message.&amp;nbsp; This line is called a "scan listing" for&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// that message.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// If no argument was given and the POP3 server issues a&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// positive response, then the response given is multi-line.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// After the initial +OK, for each message in the maildrop,&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// the POP3 server responds with a line containing&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// information for that message.&amp;nbsp; This line is also called a&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// "scan listing" for that message.&amp;nbsp; If there are no&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// messages in the maildrop, then the POP3 server responds&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// with no scan listings--it issues a positive response&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// followed by a line containing a termination octet and a&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// CRLF pair.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// In order to simplify parsing, all POP3 servers are&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// required to use a certain format for scan listings. A&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// scan listing consists of the message-number of the&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// message, followed by a single space and the exact size of&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// the message in octets. This memo makes no requirement on &lt;BR&gt;&amp;nbsp;&amp;nbsp;/// what follows the message size in the scan listing. Minimal&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// implementations should just end that line of the response&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// with a CRLF pair.&amp;nbsp; More advanced implementations may&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// include other information, as parsed from the message.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &lt;BR&gt;&amp;nbsp;&amp;nbsp;/// NOTE: This memo STRONGLY discourages implementations&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// from supplying additional information in the scan&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// listing.&amp;nbsp; Other, optional, facilities are discussed&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// later on which permit the client to parse the messages&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// in the maildrop.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Note that messages marked as deleted are not listed.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="num"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// a message-number (optional), which, if present, may NOT &lt;BR&gt;&amp;nbsp;&amp;nbsp;/// refer to a message marked as deleted&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Possible Responses: &lt;BR&gt;&amp;nbsp;&amp;nbsp;/// +OK scan listing follows&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// -ERR no such message&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string GetList(int num)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return SendCommand("LIST " + num + "\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;bool ReadMessageBody (MailHeader mailHeader)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(mailHeader.messages==null)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.messages = new ArrayList();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MailMessage mailMessage = new MailMessage();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;string delimiter = "--" + mailHeader.boundary;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;StringBuilder sBody = new StringBuilder();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;while(true)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string sTemp = streamReader.ReadLine();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(sTemp.StartsWith(delimiter) || sTemp==".")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailMessage.message = sBody.ToString();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.messages.Add(mailMessage);&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if ( sTemp == "." )&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return true;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(sTemp.Remove(0,delimiter.Length)=="--")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return true;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailMessage = new MailMessage();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Length = 0;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Append(streamReader.ReadLine());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Append("\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Append(sTemp);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Append("\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Read each part of a multipart message&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="mailHeader"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;bool ReadMessage(MailHeader mailHeader)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(mailHeader.messages==null)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.messages = new ArrayList();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MailMessage mailMessage = new MailMessage();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;string delimiter = "--" + mailHeader.boundary;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;StringBuilder sBody = new StringBuilder();&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;string sTemp = streamReader.ReadLine();&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Append(sTemp);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;bool readHeder = true;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;while(true)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sTemp = streamReader.ReadLine();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(readHeder)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(sTemp.Length&amp;gt;0 &amp;amp;&amp;amp; sTemp[0]&amp;lt;=' ')&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Append(sTemp);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;continue;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string key = sBody.ToString();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Length = 0;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(sTemp.Length==0)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;readHeder=false;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Append(sTemp);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(key.StartsWith("Content-Type: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailMessage.contentType = key.Remove(0,14);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("Content-Transfer-Encoding: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailMessage.contentTransferEncoding = key.Remove(0,27);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(sTemp.StartsWith(delimiter))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailMessage.message = sBody.ToString();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.messages.Add(mailMessage);&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(sTemp.Remove(0,delimiter.Length)=="--")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return true;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailMessage = new MailMessage();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Length = 0;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Append(streamReader.ReadLine());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;readHeder = true;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Append(sTemp);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Append("\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;bool SetMailHeader(MailHeader mailHeader, string key)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(key.StartsWith("Received: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (mailHeader.received==null)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.received = key.Remove(0,10);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if (mailHeader.received2==null)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.received2 = key.Remove(0,10);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if (mailHeader.received3==null)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.received3 = key.Remove(0,10);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("From: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.from = key.Remove(0,6);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("To: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.to = key.Remove(0,4);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("Subject: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.subject = key.Remove(0,9);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("Date: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.date = key.Remove(0,6);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("Message-ID: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.messageID = key.Remove(0,12);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("MIME-Version: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.mimeVersion = key.Remove(0,14);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("Content-Type: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int index = key.IndexOf("boundary=");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.boundary = "";&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(index!=-1)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(key[index+9]=='\"')&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int index2 = key.IndexOf("\"",index+10);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.boundary = key.Substring(index+10,index2-index-10); &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;key = key.Substring(0,index);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.contentType = key.Remove(0,14);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("X-Priority: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.X_Priority = key.Remove(0,12);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("X-MSMail-Priority: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.X_MSMail_Priority = key.Remove(0,19);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("X-Mailer: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.X_Mailer = key.Remove(0,10);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("Importance: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.importance = key.Remove(0,12);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("X-MimeOLE: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.X_MimeOLE = key.Remove(0,11);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("X-RCPT-TO: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.X_RCPT_TO = key.Remove(0,11);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("X-UIDL: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.X_UIDL = key.Remove(0,8);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(key.StartsWith("Status: "))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.status = key.Remove(0,8);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return false;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return true;&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Get all mails form the pop3 server.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="body"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// If set it returns mailheader and message.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public MailHeader[] GetMails(bool body)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;string list = GetList();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(list==null || list.Length==0 || !list.StartsWith("+OK"))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return null;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;string[] param = list.Split('\n');&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;string[] listHeader = param[0].Split(' ');&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;int count = int.Parse(listHeader[1]);&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MailHeader[] myHeader = new MailHeader[count];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (int n=0;n&amp;lt;count;n++)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string[] msg = param[n+1].Split(' ');&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;myHeader[n] = GetMail(int.Parse(msg[0]),body);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return myHeader;&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;public MailHeader GetMail(int num, bool body)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MailHeader mailHeader = null;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string sTemp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(body==true)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sTemp = SendCommand("RETR " + num + "\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sTemp = SendCommand("TOP " + num + "\r\n");&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(sTemp.StartsWith("+OK"))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string []param = sTemp.Split(' ');&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string delimiter = "--";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader = new MailHeader();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.number = num;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mailHeader.size = int.Parse(param[1]);&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;StringBuilder sBody = new StringBuilder();&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while(true)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sTemp = streamReader.ReadLine();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(sTemp==".")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// FIXME AL:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bool bRet = SetMailHeader(mailHeader,sBody.ToString()); &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*if (bRet == false &amp;amp;&amp;amp; body == true)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ReadMessage(mailHeader);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(sTemp.Length&amp;gt;0 &amp;amp;&amp;amp; sTemp[0]&amp;lt;=' ')&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Append(sTemp);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody.Append("\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Begin off message body&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if (sTemp.StartsWith(delimiter))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// new Message&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ReadMessage(mailHeader);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if (sTemp.Length == 0 &amp;amp;&amp;amp; body == true)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ReadMessageBody(mailHeader);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(sBody.Length&amp;gt;0)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SetMailHeader(mailHeader,sBody.ToString()); &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;delimiter = "--" + mailHeader.boundary; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sBody = new StringBuilder(sTemp);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// . - is the end of the server response&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;catch(Exception)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return null;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return mailHeader;&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// If the POP3 server issues a positive response, then the&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// response given is multi-line.&amp;nbsp; After the initial +OK, the&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// POP3 server sends the message corresponding to the given&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// message-number, being careful to byte-stuff the termination&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// character (as with all multi-line responses).&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="num"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// a message-number (required) which may NOT refer to a&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// message marked as deleted&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/param&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Possible Responses:&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// +OK message follows&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// -ERR no such message&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string Retr(int num)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return GetCommandBlock("RETR " + num + "\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// The POP3 server marks the message as deleted.&amp;nbsp; Any future&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// reference to the message-number associated with the message&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// in a POP3 command generates an error.&amp;nbsp; The POP3 server does&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// not actually delete the message until the POP3 session&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// enters the UPDATE state.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="num"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// a message-number (required) which may NOT refer to a &lt;BR&gt;&amp;nbsp;&amp;nbsp;/// message marked as deleted&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Possible Responses:&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// +OK message deleted&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// -ERR no such message&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string Dele(int num)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return SendCommand("DELE " + num + "\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// The POP3 server does nothing, it merely replies with a&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// positive response.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Possible Responses:&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// +OK&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string GetNoop()&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return SendCommand("NOOP\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// If any messages have been marked as deleted by the POP3&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// server, they are unmarked.&amp;nbsp; The POP3 server then replies&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Send RSET command to unmark all deleteting messages&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Possible Responses:&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// +OK&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string Rset()&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return SendCommand("RSET\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// The POP3 server removes all messages marked as deleted&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// from the maildrop and replies as to the status of this&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// operation.&amp;nbsp; If there is an error, such as a resource&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// shortage, encountered while removing messages, the&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// maildrop may result in having some or none of the messages&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// marked as deleted be removed.&amp;nbsp; In no case may the server&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// remove any messages not marked as deleted.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Whether the removal was successful or not, the server&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// then releases any exclusive-access lock on the maildrop&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// and closes the TCP connection.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Possible Responses:&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// +OK&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// -ERR some deleted messages not removed&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string Quit()&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if( netStream==null || streamReader==null)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return ("-ERR no connection");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;string tmp = SendCommand("QUIT\r\n");;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;netStream.Close();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;streamReader.Close();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return tmp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// If the POP3 server issues a positive response, then the&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// response given is multi-line.&amp;nbsp; After the initial +OK, the&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// POP3 server sends the headers of the message, the blank&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// line separating the headers from the body, and then the&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// number of lines of the indicated message's body, being&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// careful to byte-stuff the termination character (as with&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// all multi-line responses).&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Note that if the number of lines requested by the POP3&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// client is greater than than the number of lines in the&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// body, then the POP3 server sends the entire message.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="num_mess"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// a message-number (required) which may NOT refer to to a &lt;BR&gt;&amp;nbsp;&amp;nbsp;/// message marked as deleted, and&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="num_strok"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;///&amp;nbsp; a non-negative number of lines (required)&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Possible Responses: &lt;BR&gt;&amp;nbsp;&amp;nbsp;/// +OK top of message follows&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// -ERR no such message&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string GetTop(int num_mess, int num_strok)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return GetCommandBlock("TOP " + num_mess + " " + num_strok + "\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;public string GetTop(int num)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return GetCommandBlock("TOP "+ num + "\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// If an argument was given and the POP3 server issues a positive &lt;BR&gt;&amp;nbsp;&amp;nbsp;/// response with a line containing information for that message.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// This line is called a "unique-id listing" for that message.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// If no argument was given and the POP3 server issues a positive&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// response, then the response given is multi-line.&amp;nbsp; After the&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// initial +OK, for each message in the maildrop, the POP3 server&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// responds with a line containing information for that message.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// This line is called a "unique-id listing" for that message.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// In order to simplify parsing, all POP3 servers are required to&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// use a certain format for unique-id listings.&amp;nbsp; A unique-id&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// listing consists of the message-number of the message,&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// followed by a single space and the unique-id of the message.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// No information follows the unique-id in the unique-id listing. &lt;BR&gt;&amp;nbsp;&amp;nbsp;/// The unique-id of a message is an arbitrary server-determined&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// string, consisting of one to 70 characters in the range 0x21&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// to 0x7E, which uniquely identifies a message within a&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// maildrop and which persists across sessions.&amp;nbsp; This&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// persistence is required even if a session ends without&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// entering the UPDATE state.&amp;nbsp; The server should never reuse an&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// unique-id in a given maildrop, for as long as the entity&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// using the unique-id exists.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Note that messages marked as deleted are not listed.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// While it is generally preferable for server implementations&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// to store arbitrarily assigned unique-ids in the maildrop,&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// this specification is intended to permit unique-ids to be&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// calculated as a hash of the message.&amp;nbsp; Clients should be able&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// to handle a situation where two identical copies of a&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// message in a maildrop have the same unique-id.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="num"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// a message-number (optional), which, if present, may NOT&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// refer to a message marked as deleted&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Possible Responses:&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// +OK unique-id listing follows&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// -ERR no such message&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;public string GetUidl(int num)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return SendCommand( "UIDL " + num + "\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;public string GetUidl()&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return GetCommandBlock("UIDL\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;}&lt;BR&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6275555" width="1" height="1"&gt;</description></item><item><title>Giving away a free MSDN subscription to the community.</title><link>http://weblogs.asp.net/albertpascual/archive/2008/06/11/giving-away-a-free-msdn-subscription-to-the-community.aspx</link><pubDate>Thu, 12 Jun 2008 04:54:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6268673</guid><dc:creator>albertpascual</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6268673</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/06/11/giving-away-a-free-msdn-subscription-to-the-community.aspx#comments</comments><description>&lt;p&gt;I got another free &lt;a href="http://msdn.microsoft.com/en-us/subscriptions/aa718657.aspx"&gt;MSDN subscription to give away&lt;/a&gt;, I gave one last night to the &lt;a href="http://iedotnetug.org/UG/"&gt;Inland Empire User Group&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;img src="http://msdn.microsoft.com/en-us/subscriptions/bb688001.TeamSuite1(en-us,MSDN.10).jpg" /&gt; &lt;/p&gt;  &lt;p&gt;How do I make sure to give it to the community? I thought that anybody reading my blog is part of the community. I want to make sure that goes to a person or community that can use it, if you want it, please send me an email or leave a comment and let me know how you going to use it. Do you have an open source project? Are you building an application for a organization to give back? Do you have installed GeoTwitter.NET on your blog? ;-) That gives you points as well. The gift is not for sale. I’ll be happy to send it to a school, another user group or students.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Last night I &lt;a href="http://iedotnetug.org"&gt;went to the Inland Empire dot.net User Group, there were&lt;/a&gt; 37 enthusiastic people spending their night improving themselves. I must say, I haven’t seen that number of people on a user group in a very long time. &lt;/p&gt;  &lt;p&gt;There was, as well, a great presentation from Reza Madani – Business Intelligence with SQL Server 2008; “Reza's presentation covered SQL Server Integration Services (SSIS), SQL Server Analysis Services (SSAS), and SQL Server Reporting Services (SSRS)”&lt;/p&gt;  &lt;p&gt;I was very tired, my bed time was overdue. I was shocked that they didn’t had any Internet connection, that challenge alone can be difficult to provide presentations to that user group. &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Still a great experience to see a community learning and involved. Its what is all about. Does not matter if you use the ASP.NET forums or a user group, its all the community that at the end of the day will help you improve your skills as a developer. &lt;/p&gt;  &lt;p&gt;&lt;em&gt;NOTE: All costs to send the MSDN subscription will be paid by me and the gift is provided by Microsoft. However I assume all taxes laws that may apply and I am responsible for any local, state or federal taxes in connection with any gratuities given. No cost for the recipient of the gift. Microsoft provided the gift to be to share with other individuals of my choosing in the &lt;strong&gt;community.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Cheers&lt;/p&gt;  &lt;p&gt;Al&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6268673" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/albertpascual/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/MSDN/default.aspx">MSDN</category></item><item><title>GeoTwitter version 1.0 released!</title><link>http://weblogs.asp.net/albertpascual/archive/2008/06/04/geotwitter-version-1-0-released.aspx</link><pubDate>Thu, 05 Jun 2008 05:07:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6248596</guid><dc:creator>albertpascual</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6248596</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/06/04/geotwitter-version-1-0-released.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/albertpascual/WindowsLiveWriter/GeoTwitterversion1.0released_F744/image_2.png"&gt;&lt;img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="186" alt="image" src="http://weblogs.asp.net/blogs/albertpascual/WindowsLiveWriter/GeoTwitterversion1.0released_F744/image_thumb.png" width="244" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Finally I released the first version, you can see the &lt;a href="http://geotwitter.net/Default2.aspx"&gt;big map with all the twitters here.&lt;/a&gt; Added the iPhone supprt, new look and feel, contact form for your feedback as well. Please let me know what you think and where to go from here!&lt;/p&gt;  &lt;p&gt;The biggest feature that I have been asked by many users, was to add the avatars of the people on the map, I changed the default icon now to the user avatar.&lt;/p&gt;  &lt;p&gt;As promised a month ago, now you can see the location of all users, not just the ones using GeoTwitter.NET, you can also find the other users on the map with an approximation of the location added when they register into Twitter. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/albertpascual/WindowsLiveWriter/GeoTwitterversion1.0released_F744/image_4.png"&gt;&lt;img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="154" alt="image" src="http://weblogs.asp.net/blogs/albertpascual/WindowsLiveWriter/GeoTwitterversion1.0released_F744/image_thumb_1.png" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Another new feature is the button “Auto Find Me” that will set your position using your IP address, just press the button and the coordinates will be auto populated depending on your IP address. Of course you can still set your position by entering the complete address, city or zip code.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/albertpascual/WindowsLiveWriter/GeoTwitterversion1.0released_F744/image_6.png"&gt;&lt;img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="64" alt="image" src="http://weblogs.asp.net/blogs/albertpascual/WindowsLiveWriter/GeoTwitterversion1.0released_F744/image_thumb_2.png" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I have received a few emails from people outside of the US, asking me, why I center the map to the US only. My apologies, now the map will be centered by locating your IP address, so you can see the people around you that you are following.&lt;/p&gt;  &lt;p&gt;A big deal on work adding support for the iPhone location services. When you use &lt;a href="http://geotwitter.net/"&gt;GeoTwitter.NET&lt;/a&gt; using the iPhone you’ll find out that your location will be found, as well as using the desktop or any other mobile device you can change your location by pressing the button “Set Address”&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;I need your help&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Even this is the release I wanted, now I have been gathering more requirements, thanks to all the people that blog and used twitter. Having &lt;a href="http://scobleizer.com"&gt;Robert Scoble&lt;/a&gt; tweet about it didn’t hurt at all. The first hour after he tweet, I got 600 users!&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Amazing that one person has so much power, he was blamed last week for taking down &lt;a href="http://twitter.com/"&gt;Twitter&lt;/a&gt;. Just glad GeoTwitter was design to take a small load of people at the time without any problem. Even that I need more repeating users, so if you got a few minutes, please be kind and check out Geotwitter.NET, then send me &lt;a href="http://geotwitter.net/Contact.aspx"&gt;some feedback&lt;/a&gt;. If you own a blog or if you would like to tweet about and help spreading the word as well . It’s very important to get at least 100 users using it in the same time. &lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;The future is bright&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;What’s next for me? Well one thing looks clear, a new look and feel for GeoTwitter is in order. Improved other mobile devices support instead of the iPhone as well as creating a desktop application to track your locations. Adding the way to geotag a image taken by your mobile device to the current location. There are many features they were requested, like finding friends around you, however now that you can see the map avatar, one simple look and you’ll be able to see who is around you. Let me know what do you think!&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Cheers&lt;/p&gt;  &lt;p&gt;Al&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6248596" width="1" height="1"&gt;</description></item><item><title>How to add GeoTwitter to your blog or website</title><link>http://weblogs.asp.net/albertpascual/archive/2008/05/28/how-to-add-geotwitter-to-your-blog-or-website.aspx</link><pubDate>Thu, 29 May 2008 06:41:09 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6227458</guid><dc:creator>albertpascual</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6227458</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/05/28/how-to-add-geotwitter-to-your-blog-or-website.aspx#comments</comments><description>&lt;p&gt;&lt;img src="http://weblogs.asp.net/blogs/albertpascual/WindowsLiveWriter/iPhonesupportforGeoTwitter.Net_BE24/image_thumb.png" align="left" /&gt;&amp;#160; You can add &lt;a href="http://geotwitter.net/"&gt;Geotwitter.NET&lt;/a&gt; to your website or blog with a simple JavaScript include and will provide two functions:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;You can see the last 10 users using Twitter the have a location as well as you can only show your last location. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The code to add on your website is:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&amp;lt;script type=&lt;span class="str"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&lt;span class="str"&gt;&amp;quot;http://geotwitter.net/Where.ashx&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;p&gt;Has a few parameters that you can modify the size to fit your website&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;To change the the size you can use parameters &lt;em&gt;&lt;strong&gt;Width&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;Height&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&amp;lt;script type=&lt;span class="str"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&amp;quot;&lt;span class="str"&gt;&lt;a href="http://geotwitter.net/Where.ashx?width=500&amp;amp;height=300"&gt;http://geotwitter.net/Where.ashx?width=500&amp;amp;height=300&lt;/a&gt;&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;p&gt;You'll be required to create a key at Google Maps with the domain you are using, to create the key if free &lt;a href="http://code.google.com/api/maps/"&gt;and you can generate it here&lt;/a&gt;. Then you sent it on the script like this:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&amp;lt;script type=&lt;span class="str"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&amp;quot;&lt;span class="str"&gt;&lt;a href="http://geotwitter.net/Where.ashx?googlekey=ABQIAAAAel8IPnI5wEvR5PtOvUjVJxQNlqpZBVZoSHorPhx1jq-2Q98j_hSr8_uxZyh4Mo--_q1VGkVdnmqp6Q"&gt;http://geotwitter.net/Where.ashx?googlekey=ABQIAAAAel8IPnI5wEvR5PtOvUjVJxQNlqpZBVZoSHorPhx1jq-2Q98j_hSr8_uxZyh4Mo--_q1VGkVdnmqp6Q&lt;/a&gt;&lt;/span&gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;p&gt;The above samples will just provide the last 10 people using GeoTwitter, if you only want to provide your location you can just pass the username&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&amp;lt;script type=&lt;span class="str"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&lt;span class="str"&gt;&amp;quot;http://geotwitter.net/Where.ashx?Width=800&amp;amp;Height=600&amp;amp;googlekey=ABQIAAAAel8IPnI5wEvR5PtOvUjVJxR27VTUqgbR8dNmH64FZ-vxUR2MiBSF3HjombTc31cw-p0IB0OSNdE7PQ&amp;amp;Username=alpascual&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;p&gt;Cheers&lt;/p&gt;

&lt;p&gt;Al&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6227458" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/albertpascual/archive/tags/Code/default.aspx">Code</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/GeoRSS/default.aspx">GeoRSS</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/Geo+Twitter/default.aspx">Geo Twitter</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/AJAX/default.aspx">AJAX</category></item><item><title>ASP.NET MVC Preview 3 Released</title><link>http://weblogs.asp.net/albertpascual/archive/2008/05/27/asp-net-mvc-preview-3-released.aspx</link><pubDate>Wed, 28 May 2008 06:50:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6225677</guid><dc:creator>albertpascual</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6225677</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/05/27/asp-net-mvc-preview-3-released.aspx#comments</comments><description>&lt;P&gt;Microsoft news about releasing products does not come from a news release any more, for the past 2 years &lt;A href="http://weblogs.asp.net/scottgu/default.aspx" mce_href="http://weblogs.asp.net/scottgu/default.aspx"&gt;Scott Guthrie&lt;/A&gt; breaks the news to the geek world. I hope he was in twitter or better yet at &lt;A href="http://geotwitter.net/" mce_href="http://geotwitter.net/"&gt;geotwitter&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;Why is ASP.NET MVC lately so important to geeks? Is the new way to write web apps? Is the webforms not good anymore?&lt;/P&gt;
&lt;P&gt;I don’t think that web forms is not important anymore, the big deal is that for first time, Microsoft is providing an open source from inside the house. ASP.NET MVC is the first open source project from Microsoft. To do that they gave a job to Phil Haack, a very well known guy on the open source world, creator of SubVersion. That funny enough after getting the job at Microsoft he went dark on the open source world!&lt;/P&gt;
&lt;P&gt;He is working in a few fixes for SubText, and he is blogging here and there, however the ASP.NET MVC open source project is only one way, they release the code and we get it all, however, I was expecting a little more interaction and allowing non-Microsoft users to submit changes to the main branch. Maybe I was expecting too much. None less a great move by Microsoft to show interaction with the community, even when they grab something that was “very Java” to move it into .NET. Some say a genius move by Scott Guthrie. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://weblogs.asp.net/scottgu/archive/2008/05/27/asp-net-mvc-preview-3-release.aspx" mce_href="http://weblogs.asp.net/scottgu/archive/2008/05/27/asp-net-mvc-preview-3-release.aspx"&gt;ScottGu announcement and tutorial&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A title="" href="http://haacked.com/archive/2008/05/23/updated-northwind-demo.aspx" mce_href="http://haacked.com/archive/2008/05/23/updated-northwind-demo.aspx"&gt;Haacked announcement&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Al&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6225677" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/albertpascual/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/MVC/default.aspx">MVC</category></item><item><title>iPhone support for GeoTwitter.Net</title><link>http://weblogs.asp.net/albertpascual/archive/2008/05/24/iphone-support-for-geotwitter-net.aspx</link><pubDate>Sat, 24 May 2008 23:51:40 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6218979</guid><dc:creator>albertpascual</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/albertpascual/rsscomments.aspx?PostID=6218979</wfw:commentRss><comments>http://weblogs.asp.net/albertpascual/archive/2008/05/24/iphone-support-for-geotwitter-net.aspx#comments</comments><description>&lt;p&gt;I spent this shorts periods of free time this long weekend providing iPhone support to &lt;a href="http://geotwitter.net"&gt;GeoTwitter&lt;/a&gt;, actually for a non UI person like me a little more difficult that I thought, still looking back to it, looks pretty crappy compared to other iPhone designs like &lt;a href="http://hahlo.com/"&gt;Hahlo&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The improvements in the new version already available at &lt;a href="http://codeplex.com/geotwitter"&gt;CodePlex&lt;/a&gt; includes;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;iPhone support including geolocations, allowing you to set the location by just entering the street, city, state, county. Saved in your profile until you change it. &lt;/li&gt;    &lt;li&gt;AutoLogin, if you check the Remember Me checkbox, every time you come back to &lt;a href="http://geotwitter.net"&gt;geotwitter.net&lt;/a&gt; you'll be auto login into the system. &lt;/li&gt;    &lt;li&gt;Major code clean up and moved crappy code from pages to classes. &lt;/li&gt;    &lt;li&gt;The Google maps now open on the iPhone to see the location and the messages of your friends, you can pan, zoom in and out. The iPhone Google Maps support &lt;a href="http://georss.org/blog/2008/05/22/geotwitter-georss-with-twitter"&gt;GeoRSS&lt;/a&gt; and that's how GeoTwitter streams the positions to the iPhone internal Google Maps application. &lt;/li&gt;    &lt;li&gt;Added support to enter the address in the main page (not using the iPhone) or to click on the map. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Also participate on the reply tracking by following &lt;a href="http://twitter.com/mvps"&gt;http://twitter.com/mvps&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Every reply you get from watched twitter users, will be recorded and added on the list: &lt;a href="http://geotwitter.net/replies.aspx"&gt;http://geotwitter.net/replies.aspx&lt;/a&gt; Right now, &lt;a href="http://twitter.com/shanselman"&gt;Scott Hanselman&lt;/a&gt; is in the top of the list, no shocker as he is famous for engaging the audience on his speeches. &lt;/p&gt;  &lt;p&gt;I'll improving and testing GeoTwitter on the iPhone, having the internal iPhone Google maps read the posts by location using GeoRSS is a great advance, however, what I would like to do now is to be able to refresh Google maps every x amount of time to enhance the experience using GeoRSS. The user won't have to leave the iPhone Google maps to read the posts, only to write a message.&lt;/p&gt;  &lt;p&gt;Also all posts from geotwitter now come with location as well as from geotwitter tag, thanks to Twitter for doing that.&lt;/p&gt;  &lt;p&gt;For more information, please follow me with &lt;a href="http://geotwitter.net/alpascual"&gt;GeoTwitter&lt;/a&gt; or subscribe to the &lt;a href="http://alpascual.com/blog/al/rss.aspx"&gt;blog&lt;/a&gt;. Feel free to help out with the cleaning of the code or with the UI at &lt;a href="http://codeplex.com/geotwitter"&gt;codeplex.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Please be sure to leave comments and feedback, any idea is important to me. What do you like and what do you hate, did you find bugs? If you have an iPhone please use Google Maps app to read the messages.&lt;/p&gt;  &lt;p&gt;You can add GeoTwitter.NET on your website, by adding the code below. A map will show on your website/blog with the latest updates geocoded. Also by using a parameter you can only show where are you at the time.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/albertpascual/WindowsLiveWriter/iPhonesupportforGeoTwitter.Net_BE24/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="image" src="http://weblogs.asp.net/blogs/albertpascual/WindowsLiveWriter/iPhonesupportforGeoTwitter.Net_BE24/image_thumb.png" width="187" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;pre class="csharpcode"&gt;&amp;lt;script type=&lt;span class="str"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&lt;span class="str"&gt;&amp;quot;http://geotwitter.net/Where.ashx&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;

&lt;pre class="csharpcode"&gt;or just you with:&lt;/pre&gt;

&lt;pre class="csharpcode"&gt;&amp;lt;script type=&lt;span class="str"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&lt;span class="str"&gt;&lt;a href="http://geotwitter.net/Where.ashx?Username=alpascual"&gt;http://geotwitter.net/Where.ashx?Username=alpascual&lt;/a&gt;&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;

&lt;p&gt; You can add width, height on the parameters to change the map size as well you need googlekey to use the maps.&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;

&lt;p&gt;Al&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6218979" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/albertpascual/archive/tags/Code/default.aspx">Code</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/Geo+Twitter/default.aspx">Geo Twitter</category><category domain="http://weblogs.asp.net/albertpascual/archive/tags/CodePlex/default.aspx">CodePlex</category></item></channel></rss>