Koolwired.IMAP is a C# .NET implementation of the IMAP mail protocol. The library has been tested to support various IMAP servers including CourierIMAP and Dovecot. Relased under a New BSD license this library is free for developers to implement in open and closed source applications. This software will play a crutial role in Koolwired's efforts to expand protfolio of internet based mail tools.
Example: Mail.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
if (Session.Count == 0)
{
FormsAuthentication.RedirectToLoginPage();
Response.End();
}
if (!IsPostBack)
{
BindMessages();
}
}
protected void BindMessages()
{
ImapCommand command = new ImapCommand(connection);
ImapAuthenticate authenticate = new ImapAuthenticate(connection, Session["Username"].ToString(), Session["Password"].ToString());
connection.Open();
authenticate.Login();
ImapMailbox mailbox = command.Select("INBOX");
this.TotalRecords = mailbox.Exist;
mailbox = command.Fetch(mailbox);
authenticate.Logout();
connection.Close();
Messages.DataSource = mailbox.Messages;
Messages.DataBind();
}