Permalink
Browse files

Move to old-code

svn path=/old-code/; revision=156225
  • Loading branch information...
1 parent d27dce8 commit 5910f165ac8793a36c4c2243675f58d49a23daa1 @migueldeicaza migueldeicaza committed Apr 27, 2010
View
@@ -0,0 +1,6 @@
+2006-07-14 Zac Bowling <zac@zacbowling.com>
+ src/POP3Connect.cs: Patch from Lars Brubaker
+
+2005-03-19 Zac Bowling <zac@zacbowling.com>
+
+ * * : Intial commit of Mono.Net.POP3
View
@@ -0,0 +1,21 @@
+Copyright (c) 2005 Zac Bowling, Ximian, Inc and the individuals listed
+on the ChangeLog entries.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -0,0 +1,15 @@
+CSC=mcs
+#PROGFILES=`cygpath \`cygpath -m -s "$(PROGRAMFILES)"\``
+#CSC=$(PROGFILES)/Mono-1.1.3/bin/mcs.bat /d:WIN32
+#ROOT=/cygdrive/$(subst \,/,$(subst :\,/,$(SYSTEMROOT)))
+#CSC=$(ROOT)/microsoft.net/framework/v1.1.4322/csc.exe /d:WIN32 /optimize+
+
+default:
+ $(CSC) /target:library ./src/POP3Connection.cs ./src/POP3Message.cs ./src/AssemblyInfo.cs /out:Mono.Net.POP3.dll
+ $(CSC) /target:exe ./samples/GetLastMessage.cs /r:Mono.Net.POP3.dll /out:./GetLastMessage.exe
+ $(CSC) /target:exe ./samples/ListSubjects.cs /r:Mono.Net.POP3.dll /out:./ListSubjects.exe
+ $(CSC) /target:exe ./samples/ListIDs.cs /r:Mono.Net.POP3.dll /out:./ListIDs.exe
+ $(CSC) /target:exe ./samples/LastMessageHeaders.cs /r:Mono.Net.POP3.dll /out:./LastMessageHeaders.exe
+
+clean:
+ rm Mono.Net.POP3.dll GetLastMessage.exe ListIDs.exe ListSubjects.exe LastMessageHeaders.exe
Binary file not shown.
View
@@ -0,0 +1,24 @@
+Mono.Net.POP3
+Copyright 2005(C) Zac Bowling
+zac@zacbowling.com
+http://zacbowling.com
+
+Licenced under the terms of the MIT X11 licence.
+Read the MIT.X11 for more information.
+
+FEATURES:
+* List support
+* Top support with full message fall back.
+* Decodes headers and messages for you.
+* Delete support
+* Lots of nice helper functions
+* On-demand connection ablity
+* Really simpile and lightweight
+* Uses nothing more then System.Net
+
+KNOWN ISSUE:
+* None so far :-)
+
+SAMPLES:
+All of the samples are in the following syntax.
+> mono <sample>.exe <username> <password> <server IP/Hostname>
@@ -0,0 +1,31 @@
+using System;
+using System.Net;
+using Mono.Net.POP3;
+
+namespace Mono.Net.POP3.Samples
+{
+public class Test1
+{
+ public static void Main(string[] args)
+ {
+ POP3Connection mails = new POP3Connection(
+ args[0], args[1], args[2]);
+ mails.Open();
+ short messcount = mails.MessageCount();
+ Console.WriteLine("MESSAGES COUNT: {0}",messcount);
+
+ short[] q = mails.List();
+ POP3Message msg = mails.Retr(q[q.GetUpperBound(0)]);
+
+ Console.WriteLine("MESSAGE TO:\t {0}", msg.To);
+ Console.WriteLine("MESSAGE FROM:\t {0}", msg.From);
+ Console.WriteLine("MESSAGE SUBJECT: {0}", msg.Subject);
+ Console.WriteLine("MESSAGE DATE:\t {0}", msg.Date);
+ Console.WriteLine("--- MESSAGE ---\n {0}", msg.Message);
+
+ mails.Close();
+
+ }
+}
+}
+
@@ -0,0 +1,29 @@
+using System;
+using System.Net;
+using Mono.Net.POP3;
+using System.Collections;
+using System.Collections.Specialized;
+
+namespace Mono.Net.POP3.Samples
+{
+public class Test1
+{
+ public static void Main(string[] args)
+ {
+ POP3Connection mails = new POP3Connection(
+ args[0], args[1], args[2]);
+ mails.Open();
+ short messcount = mails.MessageCount();
+ Console.WriteLine("MESSAGES COUNT: {0}",messcount);
+
+ short[] q = mails.List();
+ POP3Message msg = mails.Retr(q[q.GetUpperBound(0)]);
+ foreach ( DictionaryEntry de in msg.Headers )
+ Console.WriteLine( "\n***********\n{0}\n-----------\n{1}", de.Key, de.Value );
+
+ mails.Close();
+
+ }
+}
+}
+
@@ -0,0 +1,27 @@
+using System;
+using System.Net;
+using Mono.Net.POP3;
+
+namespace Mono.Net.POP3.Samples
+{
+public class Test2
+{
+ public static void Main(string[] args)
+ {
+ POP3Connection mails = new POP3Connection(
+ args[0], args[1], args[2]);
+
+ mails.Open();
+ int messcount = mails.MessageCount();
+ Console.WriteLine("MESSAGES COUNT: {0}",messcount);
+
+ foreach (short s in mails.List())
+ Console.WriteLine(s);
+
+
+ mails.Close();
+
+ }
+}
+}
+
@@ -0,0 +1,30 @@
+using System;
+using System.Net;
+using Mono.Net.POP3;
+
+namespace Mono.Net.POP3.Samples
+{
+public class Test2
+{
+ public static void Main(string[] args)
+ {
+ POP3Connection mails = new POP3Connection(
+ args[0], args[1], args[2]);
+
+ mails.Open();
+ int messcount = mails.MessageCount();
+ Console.WriteLine("MESSAGES COUNT: {0}",messcount);
+
+ POP3Message[] msgs = mails.GetMessageRange(messcount-21,messcount-1,false);
+
+ foreach (POP3Message msg in msgs)
+ {
+ Console.WriteLine("{0} \n{1} \n{2} \n\n", msg.From.Trim(), msg.Subject.Trim(), msg.Date.Trim());
+ }
+
+ mails.Close();
+
+ }
+}
+}
+
@@ -0,0 +1,6 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly:AssemblyVersion("1.0.0.0")]
+[assembly:AssemblyDelaySign(false)]
+[assembly:AssemblyKeyFile("Mono.Net.Pop3.snk")]
Oops, something went wrong.

0 comments on commit 5910f16

Please sign in to comment.