The authentication type, used when logging into the IMAP Server
[C#]
IMAP4 imap = new IMAP4( "mail.example.com" );
imap.Logger = new IMAPLog();
imap.Logger.InMemory = true;
imap.Logger.Path = "C:\\imap.log";
imap.Login("test@example.com", "test", AuthenticationType.ClearText );
//list all of the folders
MailFolderCollection mfc = imap.FolderList();
Console.WriteLine( mfc.ToString() );
//write out the log, the username and password will be masked
Console.WriteLine( imap.Logger.ToString() );
imap.Disconnect();
Console.WriteLine( "Done" );
Console.ReadLine();
[VB.NET]
Dim imap As New IMAP4("mail.example.com")
imap.Logger = New IMAPLog()
imap.Logger.InMemory = True
imap.Logger.Path = "C:\imap.log"
imap.Login("test@example.com", "test", AuthenticationType.ClearText)
'list all of the folders
Dim mfc As MailFolderCollection = imap.FolderList()
Console.WriteLine(mfc.ToString())
'write out the log, the username and password will be masked
Console.WriteLine(imap.Logger.ToString())
imap.Disconnect()
Console.WriteLine("Done")
Console.ReadLine()
| Member Name | Description |
|---|---|
| ClearText | Clear text authentication |
| LoginAuthentication | Basic authentication, as implemented by the mail server. |
Namespace: aspNetIMAP
Assembly: aspNetIMAP (in aspNetIMAP.dll)