Skip to content

Instantly share code, notes, and snippets.

@jordonbiondo
Created September 27, 2012 16:26
Show Gist options
  • Save jordonbiondo/3794944 to your computer and use it in GitHub Desktop.
Save jordonbiondo/3794944 to your computer and use it in GitHub Desktop.
emails
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LumiSoft.Net.IMAP.Client;
using LumiSoft.Net.IMAP;
using LumiSoft.Net;
using LumiSoft.Net.Mail;
using LumiSoft.Net.MIME;
using D.Net.EmailInterfaces;
using System.Threading;
namespace D.Net.EmailClient
{
public class IMAP_Wrapper : IEmailClient
{
public static void Main(string[] args) {
IMAP_Wrapper imapper = new IMAP_Wrapper();
imapper.Connect("imap.gmail.com", "[email protected]", "********", 993, true);
Console.WriteLine(imapper.IsConnected);
imapper.SetCurrentFolder("INBOX");
imapper.OnMessagesLoaded = stuff;
imapper.LoadMessages("300", "*");
imapper.Messages.Reverse();
foreach (IEmail m in imapper.Messages) {
m.LoadInfos();
Console.WriteLine(m.Subject);
}
}
public static void stuff(object sender) {
Console.WriteLine("yay");
}
}
}
//Output
//True
//yay
//yup, B missing instruction: lw $t0, 0($t1)
//[Fwd: Kutsche Office Internship OpportunityCould you please see that the attached internship opportunities //are posted for your students. . . thanks so much!]
//GoGVSU Road Trip Starts Tomorrow
//Re: Jordon Biondo - 325 - Friday Absence
//GVSU CIS 251-01 do modified 2.6.4.b
//BIO 121 20 - General Biology II: Test 1 Information
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment