InterIMAP Forum Rss Feedhttp://www.codeplex.com/InterIMAP/Thread/List.aspxInterIMAP Forum Rss DescriptionNew Post: For a modern IMAP library, check out MailKithttp://interimap.codeplex.com/discussions/640059<div style="line-height: normal;">You can find <a href="https://github.com/jstedfast/MailKit" rel="nofollow">MailKit</a> at <a href="https://github.com/jstedfast/MailKit" rel="nofollow">https://github.com/jstedfast/MailKit</a>.
<br />
<br />
It is completely free for commercial use and is fully open source as well.
<br />
<br />
It implements all of the common IMAP extensions (ACL, QUOTA, LITERAL+, IDLE, NAMESPACE, ID, CHILDREN, LOGINDISABLED, STARTTLS, MULTIAPPEND, UNSELECT, UIDPLUS, CONDSTORE, ESEARCH, SASL-IR, COMPRESS, WITHIN, ENABLE, QRESYNC, SORT, THREAD, ESORT, SPECIAL-USE, MOVE, SORT=DISPLAY, SEARCH=FUZZY, UTF8=ACCEPT, UTF8=ONLY, XLIST, and X-GM-EXT1). It has async versions of all blocking API's and each of them supports cancellation via System.Threading.CancellationToken.
<br />
<br />
It is the best IMAP client library available for .NET. Period.
<br />
<br />
Supports .NET 4.0 and .NET 4.5.<br />
</div>jstedfastWed, 17 Jun 2015 18:35:38 GMTNew Post: For a modern IMAP library, check out MailKit 20150617063538PNew Post: Move/copy emailshttp://interimap.codeplex.com/discussions/435986<div style="line-height: normal;">Moving and copying emails between folders is shown as &quot;coming soon&quot;; how is the work on this coming?<br />
</div>apepperSat, 09 Mar 2013 11:15:57 GMTNew Post: Move/copy emails 20130309111557ANew Post: Chinese supporthttp://interimap.codeplex.com/discussions/389009<div style="line-height: normal;">
<p>How to support chinese? I uesed this componet and connected to gmail, It can works very well except a little problem, that is many chinese text are not display correctly, Anybody can help me on the issue?</p>
</div>FlyearWed, 25 Jul 2012 15:33:30 GMTNew Post: Chinese support 20120725033330PNew Post: All messages are emptyhttp://interimap.codeplex.com/discussions/348112<div style="line-height: normal;"><p>Hello, I have a problem.&nbsp;</p>
<p>I followed an example in InterIMAPConsoleTest in Program.cs.&nbsp;</p>
<p>Here is the code I have:</p>
<p>&nbsp;</p>
<div style="color: black; background-color: white;">
<pre>IMAPConfig config = <span style="color: blue;">new</span> IMAPConfig(<span style="color: #a31515;">"mail.xxxxx.ru"</span>, <span style="color: #a31515;">"mail@xxxxx.ru"</span>, <span style="color: #a31515;">"xxxxx"</span>, <span style="color: blue;">false</span>, <span style="color: blue;">true</span>, <span style="color: #a31515;">""</span>);
IMAPClient client = <span style="color: blue;">null</span>;
<span style="color: blue;">try</span>
{
client = <span style="color: blue;">new</span> IMAPClient(config, <span style="color: blue;">null</span>, 5);
IMAPFolder f = client.Folders[<span style="color: #a31515;">"INBOX"</span>];
f.Select();
<span style="color: blue;">foreach</span> (IMAPMessage msg <span style="color: blue;">in</span> f.Messages)
{
IMAPMessage fullmessage = f.GetMessageByID(msg.Uid);
ParseAndSave(fullmessage);
}
}
<span style="color: blue;">catch</span> (IMAPException e)
{
Console.WriteLine(e.Message);
<span style="color: blue;">return</span>;
}</pre>
<pre>So, in this code in fullmessage I have only Uid set, all other fields are either null or have empty default value.</pre>
<pre>What could be the problem causing this behavior?&nbsp;</pre>
<pre><br /></pre>
<pre>I've already tried to use RefreshData method on my fullmessage, but with no success.</pre>
</div>
<p>&nbsp;</p>
<div style="color: black; background-color: white;">
<pre>Appreciate any help.</pre>
</div></div>NadyaCheSat, 10 Mar 2012 17:53:56 GMTNew Post: All messages are empty 20120310055356PNew Post: Windows Phone 7.5 Support?http://interimap.codeplex.com/discussions/280617<div style="line-height: normal;">
<p>Hi guys,</p>
<p><span>This</span>&nbsp;<span>library</span>&nbsp;<span>support</span>&nbsp;<span>windows</span>&nbsp;<span>phone 7.5</span><span>?</span></p>
<p><span><span>Do you know any</span>&nbsp;<span>IMAP</span>&nbsp;<span>library&nbsp;&nbsp;<span>that I can use</span></span>&nbsp;<span>of</span>&nbsp;<span>this feature in</span>&nbsp;<span>Windows Phone</span><span>?</span></span></p>
<p>Bye.</p>
</div>felipeboneziWed, 23 Nov 2011 18:44:06 GMTNew Post: Windows Phone 7.5 Support? 20111123064406PNew Post: Flags not sethttp://interimap.codeplex.com/discussions/274735<div style="line-height: normal;">
<p>I use gmail and the flags are not set when I get the message from Inbox.. Could you please help me with this issue..</p>
<p>&nbsp;</p>
<p>Thanks,</p>
<p>Ani</p>
</div>anijoeroyTue, 04 Oct 2011 16:23:49 GMTNew Post: Flags not set 20111004042349PNew Post: Messages in subfolders and read the same message twicehttp://interimap.codeplex.com/discussions/272117<div style="line-height: normal;">
<p>Hi.</p>
<p>I have 2 question.</p>
<p>1. When i fetch the folderlist, i get 1 folder and 3 subfolders.</p>
<p>INBOX, INBOX/Sent, INBOX/Trash and INBOX/Draft</p>
<p>When i select INBOX, i get allt the messages in INBOX, but i don't the the sent messages when i select INBOX/Sent.</p>
<p>And i'm using the sample code to fetch messages:</p>
<p></p>
<div style="color:black; background-color:white">
<pre> <span style="color:blue">string</span> name = listBox1.SelectedItem.ToString();
folder = client.MailboxManager.GetFolderByPath(name);
client.RequestManager.SubmitRequest(<span style="color:blue">new</span> MessageListRequest(folder, MessageListComplete), <span style="color:blue">false</span>);
</pre>
</div>
<p></p>
<p>Why is it doing this?</p>
<p>&nbsp;</p>
<p>Question 2. If i select a message and reads it, then select an other, and then, select the first one again, it dose not display the first. The same for every message the i've already open.</p>
<p>Why is it behaving like this? Is there any fix?</p>
</div>EndLessMindFri, 09 Sep 2011 23:05:01 GMTNew Post: Messages in subfolders and read the same message twice 20110909110501PNew Post: Hello World example?http://interimap.codeplex.com/discussions/263761<div style="line-height: normal;"><p>Ok, I've switched over to the Async test app, and have had some success getting it to work and can see how to get attachments and html text. A couple more questions:</p>
<p>I see how to set a message as "read" via the MailboxManager.MarkMessageAsRead() method, but I don't see something similar for deleting a message. I'm not sure what MailboxManager.RemoveMessage() does; it didn't delete the message for me, and I could not understand what the code was doing. I ended up using MailboxManager.SetMessageFlag( _msg, InterIMAP.Common.MessageFlag.Deleted, true, false ), and this seemed to do the trick, but I'm wondering if this is the "right" way to do the job.</p>
<p>Next, I need to get notification when a new message arrives in the inbox. Unclear how to do this. I see the NewMessagesRequest class, but this looks like I need to use this in my own polling loop. I was thinking there might be an event that I could hook and be notified when a new message arrives instead of having to poll myself. If this exists, I can't find it. I could really use a little push in the right direction on how to monitor for new messages. Thanks!</p></div>darrylwhitmoreMon, 04 Jul 2011 18:02:06 GMTNew Post: Hello World example? 20110704060206PNew Post: Hello World example?http://interimap.codeplex.com/discussions/263761<div style="line-height: normal;">
<p>I've downloaded the source and am trying to figure out the InterIMAPConsoleTest app, with little success. Could someone give me a little hello world bit of code that will demonstrate how to connect and read an email that contains an attachment? I am getting
the message, but the AttachmentsAvailable property is false and the Attachments collection has a length of zero, not to mention there seems to be no html data in the message. Clearly I'm missing something obvious, I'd appreciate any help, thanks!</p>
</div>darrylwhitmoreSun, 03 Jul 2011 22:39:34 GMTNew Post: Hello World example? 20110703103934PNew Post: Save as XMLhttp://interimap.codeplex.com/discussions/262996<div style="line-height: normal;">
<p>In the original IMAP Library there was extensive code written to save the message as an XML document which I have been using to store the messages and read them in another application.</p>
<p>I have been having a lot of problems with the original IMAP library and would prefer to switch to using this version as it appears to be more mature and up to date.</p>
<p>Is there code in this version that I have not found that allows the mail message to be stored as an XML document with a structure similar to the original library?</p>
</div>mschelstrateMon, 27 Jun 2011 21:57:05 GMTNew Post: Save as XML 20110627095705PNew Post: IMAPSearchQuery issuehttp://interimap.codeplex.com/discussions/248167<div style="line-height: normal;"><p>Unfortunately, I have not had an opportunity to test this library against Exchange 2010 see what differences exist between 2010 and 2007. I am considering a major overhaul of the library to remove the old synchronous code, simplify the API, and update it to use at least .NET 3.5, if not 4.0</p></div>JasonMiesionczekWed, 22 Jun 2011 16:26:11 GMTNew Post: IMAPSearchQuery issue 20110622042611PNew Post: Get new messageshttp://interimap.codeplex.com/discussions/257607<div style="line-height: normal;"><p>In order to get the message information itself, you must fire off a FullMessageRequest passing in the client object, and the IMessage object.&nbsp;</p></div>JasonMiesionczekWed, 22 Jun 2011 16:21:57 GMTNew Post: Get new messages 20110622042157PNew Post: Get new messageshttp://interimap.codeplex.com/discussions/257607<div style="line-height: normal;">
<p>Hello</p>
<p>I want to use this library, but somehow I can not get it to work. Only the sync model, but it does not get maintained anymore, so I do not want to use that.</p>
<p>I have det following code:</p>
<p></p>
<div style="color:black; background-color:white">
<pre><span style="color:blue">using</span> System;
<span style="color:blue">using</span> System.Collections.Generic;
<span style="color:blue">using</span> System.Text;
<span style="color:blue">using</span> InterIMAP;
<span style="color:blue">using</span> InterIMAP.Asynchronous.Client;
<span style="color:blue">using</span> InterIMAP.Common.Interfaces;
<span style="color:blue">using</span> InterIMAP.Common.Requests;
<span style="color:blue">using</span> InterIMAP.Synchronous;
<span style="color:blue">using</span> InterIMAP.Common.Processors;
<span style="color:blue">namespace</span> IMAPTest
{
<span style="color:blue">class</span> Program
{
<span style="color:blue">private</span> <span style="color:blue">static</span> <span style="color:blue">void</span> FolderTreeCallback(IRequest req)
{
<span style="color:green">//throw new NotImplementedException();</span>
}
<span style="color:blue">static</span> <span style="color:blue">void</span> nmr_NewMessageRequestCompleted(IMessage[] messages)
{
<span style="color:blue">throw</span> <span style="color:blue">new</span> NotImplementedException();
}
<span style="color:blue">static</span> <span style="color:blue">void</span> Main()
{
IMAPConfig config = <span style="color:blue">new</span> IMAPConfig(<span style="color:#a31515">&quot;******&quot;</span>, <span style="color:#a31515">&quot;*****&quot;</span>, <span style="color:#a31515">&quot;******&quot;</span>, <span style="color:blue">false</span>, <span style="color:blue">false</span>, <span style="color:#a31515">&quot;&quot;</span>);
IMAPAsyncClient client = <span style="color:blue">new</span> IMAPAsyncClient(config, 5);
client.Start();
IBatchRequest batch = <span style="color:blue">new</span> SimpleBatchRequest();
client.Start();
FolderTreeRequest ftr = <span style="color:blue">new</span> FolderTreeRequest(<span style="color:#a31515">&quot;\&quot;\&quot;&quot;</span>, <span style="color:blue">null</span>);
client.RequestManager.SubmitAndWait(ftr, <span style="color:blue">false</span>);
<span style="color:green">/*
* Get INBOX folder
*/</span>
Console.WriteLine(<span style="color:#a31515">&quot;Get INBOX.&quot;</span>);
IFolder folder = <span style="color:blue">null</span>;
FolderDataRequest fdr = <span style="color:blue">new</span> FolderDataRequest(client.MailboxManager.GetFolderByPath(<span style="color:#a31515">&quot;INBOX&quot;</span>), <span style="color:blue">null</span>);
fdr.RequestCompleted &#43;= <span style="color:blue">delegate</span>(IRequest req)
{
FolderDataProcessor fdp = req.GetProcessorAsType&lt;FolderDataProcessor&gt;();
folder = fdp.Request.Command.ParameterObjects[0] <span style="color:blue">as</span> IFolder;
};
batch.Requests.Add(fdr);
client.RequestManager.SubmitBatchAndWait(batch, <span style="color:blue">false</span>);
batch.Requests.Clear();
MessageListRequest mlr = <span style="color:blue">new</span> MessageListRequest(folder, <span style="color:blue">null</span>);
mlr.RequestCompleted &#43;= <span style="color:blue">delegate</span>(IRequest req2)
{
MessageListProcessor fdp2 = req2.GetProcessorAsType&lt;MessageListProcessor&gt;();
IFolder f2 = fdp2.Request.Command.ParameterObjects[0] <span style="color:blue">as</span> IFolder;
Console.WriteLine(<span style="color:#a31515">&quot;Message List for {0} loaded. {1} Messages found.&quot;</span>, f2.Name, f2.Exists);
IMessage[] messages = f2.Messages;
};
batch.Requests.Add(mlr);
client.RequestManager.SubmitBatchAndWait(batch, <span style="color:blue">false</span>);
Console.WriteLine(<span style="color:#a31515">&quot;Press any key&quot;</span>);
Console.ReadLine();
client.Stop();
}
}
}
</pre>
</div>
<p></p>
<p></p>
<pre>
</pre>
<p></p>
<p>In the line &quot;IMessage[] messages = f2.Messages&quot; I would expect it to get all messages. But it does not. It only gives me empty objects. It does however gives me the message count!! But gives me empty objects.</p>
<p>I have tried the sync model:</p>
<p></p>
<div style="color:black; background-color:white">
<pre><span style="color:blue">using</span> System;
<span style="color:blue">using</span> System.Collections.Generic;
<span style="color:blue">using</span> System.Linq;
<span style="color:blue">using</span> System.Text;
<span style="color:blue">using</span> InterIMAP;
<span style="color:blue">using</span> InterIMAP.Synchronous;
<span style="color:blue">namespace</span> InterIMAPSync
{
<span style="color:blue">class</span> Program
{
<span style="color:blue">static</span> <span style="color:blue">void</span> Main(<span style="color:blue">string</span>[] args)
{
IMAPConfig config = <span style="color:blue">new</span> IMAPConfig(<span style="color:#a31515">&quot;****&quot;</span>, <span style="color:#a31515">&quot;*****&quot;</span>, <span style="color:#a31515">&quot;*****&quot;</span>, <span style="color:blue">false</span>, <span style="color:blue">false</span>, <span style="color:#a31515">&quot;&quot;</span>);
InterIMAP.Synchronous.IMAPClient client = <span style="color:blue">new</span> InterIMAP.Synchronous.IMAPClient(config, <span style="color:blue">null</span>, 5);
client.Logon();
IMAPMessageCollection messages = client.GetSingleFolder(<span style="color:#a31515">&quot;INBOX&quot;</span>).Messages;
<span style="color:blue">foreach</span> (IMAPMessage message <span style="color:blue">in</span> messages)
{
Console.WriteLine(message.ThreadTopic);
}
}
}
}
</pre>
</div>
This works just fine, is easy readable, but it does not get maintained anymore, so I want to use the async way of doing it, but is there a way of making the async code as readable as the sync code?
<p></p>
<p>I have tried to use this code snippet:</p>
<p></p>
<div style="color:black; background-color:white">
<pre><span style="color:blue">static</span> <span style="color:blue">void</span> Main()
{
IMAPConfig config = <span style="color:blue">new</span> IMAPConfig(<span style="color:#a31515">&quot;mail.myhost.tl&quot;</span>, <span style="color:#a31515">&quot;xxxx@xxx.xx&quot;</span>, <span style="color:#a31515">&quot;xxxxxx&quot;</span>, <span style="color:blue">false</span>, <span style="color:blue">false</span>, <span style="color:#a31515">&quot;\&quot;\&quot;&quot;</span>);
IMAPAsyncClient client = <span style="color:blue">new</span> IMAPAsyncClient(config, 5);
client.Start();
client.RequestManager.SubmitAndWait(<span style="color:blue">new</span> FolderTreeRequest(<span style="color:#a31515">&quot;\&quot;\&quot;&quot;</span>, FolderTreeCallback), <span style="color:blue">false</span>);
NewMessagesRequest nmr = <span style="color:blue">new</span> NewMessagesRequest(client);
nmr.NewMessageRequestCompleted &#43;= <span style="color:blue">new</span> NewMessagesRequest.NewMessageRequestCompletedHandler(nmr_NewMessageRequestCompleted);
<span style="color:green">//nmr.Start(); // checks for new messages in all folders</span>
IFolder folder = client.MailboxManager.GetFolderByPath(<span style="color:#a31515">&quot;INBOX&quot;</span>);
nmr.Start(folder); <span style="color:green">// checks for new messages in the INBOX folder only</span>
}
<span style="color:blue">private</span> <span style="color:blue">static</span> <span style="color:blue">void</span> FolderTreeCallback(IRequest req)
{
<span style="color:green">// whatever logic you need to do to indicate the process has completed.</span>
}
<span style="color:blue">static</span> <span style="color:blue">void</span> nmr_NewMessageRequestCompleted(IMessage[] messages)
{
<span style="color:blue">throw</span> <span style="color:blue">new</span> NotImplementedException();
}
</pre>
</div>
<p></p>
<p>But this does not throw any exceptions. Or do anything expected. This is readable, but does not work :(</p>
<p>Am I doing anything wrong in my examples (is there an more readable way of writing an async example that fetches all unseen messages from the server?)? Or is there an easier way of doing it, that I have not spotted?</p>
<p>Hope to hear from someone.</p>
</div>mslotSat, 14 May 2011 08:19:07 GMTNew Post: Get new messages 20110514081907ANew Post: IMAPSearchQuery issuehttp://interimap.codeplex.com/discussions/248167<div style="line-height: normal;">
<p>Hello,</p>
<p>I have following code:</p>
<p>IMAPConfig config = new IMAPConfig(&quot;xxx&quot;, &quot;xxx&quot;, &quot;xxx&quot;, false, true, &quot;xxx&quot;);<br>
IMAPClient mailClient = new IMAPClient(config, null, 1);</p>
<p>IMAPFolder inboxFolder = mailClient.Folders[&quot;INBOX&quot;];<br>
IMAPMailAddress address = new IMAPMailAddress();<br>
address.Address = &quot;<a href="mailto:xxx@xx.com">xxx@xxx.com</a>&gt;&quot;;</p>
<p>IMAPSearchQuery query = new IMAPSearchQuery();<br>
query.From.Add(address);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>
IMAPSearchResult sResult = inboxFolder.Search(query);</p>
<p>The IMAPSearchResult is being empty. We were previously&nbsp;connecting to Exchange 2007 and it worked correctly but now connecting to Exchange 2010 it does not seem to work. Any suggestions? Do I have to call a different method to do that? The problem seems
to be when trying to do a Search using the From value.</p>
<p>I do a search and it does not return values when migrated to Exchange 2010. We received values correctly when using Exchange 2007.</p>
<p>Waiting for your kind help.</p>
<p>&nbsp;</p>
</div>ruyeri23Wed, 02 Mar 2011 17:11:36 GMTNew Post: IMAPSearchQuery issue 20110302051136PNew Post: Compile InterIMAPConsoleTest on VS2010http://interimap.codeplex.com/discussions/247596<div style="line-height: normal;">
<p>I downloaded the library, and am trying it out. VS2010 converts it, issuing various warnings about those /// comments being missing.</p>
<p>When I ran the InterIMAPConsole test program with my site's values, things went okay until this (line 49: Program.cs)</p>
<p>IMAPFolder f = client.Folders[&quot;INBOX&quot;];</p>
<p>// Loop until a new message gotten<br>
int[] msgCount = null;</p>
<p>// Fixes, but causes infinite loop until message arrives<br>
//int[] msgCount = f.CheckForNewMessages();</p>
<p>while (msgCount.Length == 0)<br>
{<br>
&nbsp;&nbsp;&nbsp;&nbsp; msgCount = f.CheckForNewMessages();<br>
&nbsp;&nbsp;&nbsp;&nbsp; Thread.Sleep(1000);<br>
}</p>
<p>The null on the msgCount definition causes the program to throw an exception on the while condition a few lines down.</p>
<p>I replaced the null with the f.Check, and that seems to get the code to do what was intended. However, since the exception causes the Console Window output to pause, and fixing it causes the window to scroll indefinitely until I exit debug (causing the window
to go away), I was actually better off with my study by putting the null back in! Anyway, I think you would want to fix it in the source.</p>
</div>sbowyerFri, 25 Feb 2011 17:50:32 GMTNew Post: Compile InterIMAPConsoleTest on VS2010 20110225055032PNew Post: A couple or problemshttp://interimap.codeplex.com/Thread/View.aspx?ThreadId=242688<div style="line-height: normal;">
<p>I basically am looking to monitor a gmail account. I can log in and get all the items in the inbox - well, everything except the message bodies:</p>
<p><strong>Getting message bodies:</strong><br>
OK, so first, here is some sample code that works - except that TextData, HtmlData, and the attachments are not there. Is there some method I need to call to populate that data? Also, ContentLoaded is false:</p>
<div style="color:black; background-color:white">
<pre> IMAPClient client = <span style="color:blue">new</span> IMAPClient();
client.Config =
<span style="color:blue">new</span> IMAPConfig(<span style="color:#a31515">&quot;imap.gmail.com&quot;</span>,
<span style="color:#a31515">&quot;awesome.duh-developer@gmail.com&quot;</span>, <span style="color:#a31515">&quot;secretpass&quot;</span>, <span style="color:blue">true</span>, <span style="color:blue">true</span>, <span style="color:#a31515">&quot;&quot;</span>);
client.Logon();
<span style="color:blue">foreach</span> (IMAPMessage message <span style="color:blue">in</span> client.Folders[<span style="color:#a31515">&quot;INBOX&quot;</span>].Messages)
{
<span style="color:green">// TextData is null</span>
model.Add(<span style="color:blue">new</span> MailModel()
{
From = message.From[0].DisplayName,
<span style="color:green">//Body = message.TextData.TextData,</span>
Subject = message.Subject,
ItemDate = message.Date.ToLocalTime(),
MailId = message.Uid,
IsNew = message.Flags.New
});
}
</pre>
</div>
<p>Any ideas on what I'm doing wrong here? I can see the from, to, subject, etc - but the actual message body is not there.</p>
<p><strong>Seeing if a message is &quot;new&quot; or not:</strong><br>
From the code sample above, the message.Flags.New is ALWAYS false. This seemed like a nice way to differentiate if an e-mail is new or not but it doesn't work. Any idea what's wrong here? Is there any alternative to seeing if the message has been read or not?</p>
<p><strong>Best-practices for monitoring for new messages:</strong><br>
IMAP natively supports the notion of &quot;idle&quot; where the caller will be notified when a new message arrives. I could find this in this implementation, is that supported? Or, should the developer just poll over 15 minutes or so? Also, I noticed that the IMAPClient
doesn't implement IDisposable, which i would expect if the resources for that component (like the network stream) are to be cleaned up. Is it alright to use the code sample like above or is there some other calling convention that would be better? This is
for a monitoring application that will run 24/7 and I don't want to have a memory leak.</p>
<p>Anyone have any thoughts on these? thanks!</p>
<p>-Rob</p>
</div>RobSederFri, 21 Jan 2011 03:31:48 GMTNew Post: A couple or problems 20110121033148ANew Post: Time Zone / Offsethttp://interimap.codeplex.com/Thread/View.aspx?ThreadId=239676<div style="line-height: normal;">
<pre><span>I'm looking at <strong>MessageHeaderProcessor.cs </strong>and see this method. The regex knows to match the offset ([-]\d&#43;), but doesn't capture or use it.&nbsp;</span></pre>
<pre><span><br></span></pre>
<pre><span>Am I missing something? Is this the actual place in code where dates are parsed? </span></pre>
<pre><span><br></span></pre>
<pre><span> private</span> DateTime ParseDate(<span>string</span> date)
{
<span>//Tue, 7 Apr 2009 09:04:02 -0700 (PDT)</span>
<span>string</span> pattern = <span>@&quot;^\w&#43;[,]\s&#43;(?&lt;day&gt;(\d&#43;))\s&#43;(?&lt;month&gt;(\w&#43;))\s&#43;(?&lt;year&gt;(\d&#43;))\s&#43;(?&lt;hour&gt;(\d{2})):(?&lt;min&gt;(\d{2})):(?&lt;sec&gt;(\d{2}))\s&#43;[-]\d&#43;\s&#43;&quot;</span>;
Match match = Regex.Match(date, pattern);
<span>if</span> (match.Success)
{
<span>int</span> day = Int32.Parse(match.Groups[<span>&quot;day&quot;</span>].Value);
<span>int</span> month = GetMonth(match.Groups[<span>&quot;month&quot;</span>].Value);
<span>if</span> (month == 0)
<span>throw</span> <span>new</span> Exception(<span>&quot;Could not identify month in date string&quot;</span>);
<span>int</span> year = Int32.Parse(match.Groups[<span>&quot;year&quot;</span>].Value);
<span>int</span> hour = Int32.Parse(match.Groups[<span>&quot;hour&quot;</span>].Value);
<span>int</span> min = Int32.Parse(match.Groups[<span>&quot;min&quot;</span>].Value);
<span>int</span> sec = Int32.Parse(match.Groups[<span>&quot;sec&quot;</span>].Value);
DateTime d = <span>new</span> DateTime(year, month, day, hour, min, sec);
<span>return</span> d;
}
DateTime d2 = <span>new</span> DateTime();
DateTime.TryParse(date, <span>out</span> d2);
<span>return</span> d2;
}</pre>
</div>pettijohnMon, 27 Dec 2010 18:31:53 GMTNew Post: Time Zone / Offset 20101227063153PNew Post: Problems with Attachmentshttp://interimap.codeplex.com/Thread/View.aspx?ThreadId=238238<div style="line-height: normal;">
<p>Hi,</p>
<p>I have been testing InterIMAP for a few moments and I am very impressed. I have tested some other libraries as well and think that this is the most intelligent. It works very well with a sensible class structure and is not following the technical side.</p>
<p>But I ran into some problems with attachments. At first, they were not recognized at all, until I have made a small modification. But it still does not find the correct filename. I am not that good with the library that I would have found the problem already,
but I would create a mail account to test with if required. My server uses dovecot, if that is of any interest.</p>
<p>kind regards,<br>
Philip</p>
</div>pdfforgeMon, 13 Dec 2010 23:06:40 GMTNew Post: Problems with Attachments 20101213110640PNew Post: How to get Unseen MessageListRequest?http://interimap.codeplex.com/Thread/View.aspx?ThreadId=204165<div style="line-height: normal;">
<p>I would like to add that I was also having problems with the QuickSearchNew because I believed (as the comment in the code states) that it would return unseen messages. This however is not the truth. In order to fix this I changed IMAPFolder.cs (around like
840) to have the following:</p>
<p>if (query.New)</p>
<p>{</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;searchTerms.Add(&quot;UNSEEN&quot;); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>}</p>
<p>That fixed my problem and all unread emails are now being searched for correctly. However this might lead to other problems where you did in fact want to search for &quot;NEW&quot;. I am not familiar with all the IMAP4 protocols, so I cannot verify that the &quot;NEW&quot;
is useful in any case or not.</p>
</div>ostlercMon, 29 Nov 2010 21:54:01 GMTNew Post: How to get Unseen MessageListRequest? 20101129095401PNew Post: Running the basic example codehttp://interimap.codeplex.com/Thread/View.aspx?ThreadId=228380<div style="line-height: normal;">
<p>IMAPAsyncClient belongs here:</p>
<p>&nbsp;</p>
<pre>InterIMAP.Asynchronous.Client.IMAPAsyncClient</pre>
<p>&nbsp;</p>
<p>Not Here:</p>
<p>&nbsp;</p>
<pre>InterIMAP.IMAPAsyncClient</pre>
<p>&nbsp;</p>
<p>So, you need to replace...</p>
<p>&nbsp;</p>
<pre>IMAPAsyncClient client = new IMAPAsyncClient(config, 5);</pre>
<p>&nbsp;</p>
<p>with something like this...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<pre>InterIMAP.Asynchronous.Client.IMAPAsyncClient = new InterIMAP.Asynchronous.Client.IMAPAsyncClient(config, 5);&nbsp; <br></pre>
<p>Or, declare...</p>
<pre>using InterIMAP.Asynchronous.Client;</pre>
<p>&nbsp;</p>
</div>gwsFri, 26 Nov 2010 16:22:37 GMTNew Post: Running the basic example code 20101126042237P