Hello,
I have a developer OEM subscription for Aspose.Email
My application uses aspose pop3 client to connect to exchange and download email
Now, i need to configure it on a scenario, where (i suppose) exchange is configured to NTLM.
If i try with thunderbird or other, i set “NTLM” in the “authentication method” dropdown, and it works.
How should i configure the aspose pop3 client?
Thanks
Best regards,
Andrea
Hi Andrea,
Hi Andrea,
hello,
thank you for your attention.
At the moment, i conviced my customer to change the Exchange settings, and remove the NTLM authentication from the POP3 settings, so my application can work.
My application is very light and multi-purpose so i decided not to use IMAP.
Thank you
best regards,
Andrea
Hi Andrea,
Hi Andrea,
hello,
donwloaded the new release, but i cannot find “how” should i specify the NTLM option in POP3 client…
Thanks
Andrea
Hi Andrea,
Please have a look at the following code sample for your kind reference where UseDefaultCredentials flag is set to true for this purpose.
Code Sample:
using (Pop3Client popClient = new Pop3Client("pop-server.com", 995))
{
popClient.EnableSsl = true;
popClient.SecurityMode = Pop3SslSecurityMode.Implicit;
popClient.UseDefaultCredentials = true;
Console.WriteLine("Pop3 client is connecting...");
popClient.Connect(true);
Console.WriteLine("Pop3 client has been connected successfully.");
Pop3MessageInfoCollection messageInfoCol = popClient.ListMessages();
Console.WriteLine(string.Format("Inbox contains: {0} messages", messageInfoCol.Count));
}
Hello,
i'm going to test your code, but i think there's something missing.
If you don't provide the "usual" username and password, which mailbox are you entering in?
In other words... if i'm right, NTLM (default credentials) it's about secure authentication... instead of kerberos or something else.
So, once authenticated the "connection", you have to provide the login information to the pop3, in order to open a certain mailbox.
Anyway... look at a non-microsoft email client (any client different from outlook), go to the account options, then server options.
NTLM is on a dropdown called "authentication method", under "Security settings".... it's not a replacement for the username/password of the mailbox.
So.... if i use your code, it goes ok on Connect(), but when i ListMessages() i get this error: "The server returned an invalid response to the UIDL command."
If I add the login information, just like:
popClient.Username = "user";
popClient.Password = "pass";
then i get this error on Connect(): "User command error:-ERR Command is not valid in this state.User command error:-ERR Command is not valid in this state."
Hi Andrea,
- Which server version you are using?
- code snippet that gives raise to this error and your network setup details?
Hello,
I know a few about NTLM, and how should be used.....
Anyway, it's possible to use NTLM in combination with basic authentication. If you open the configuration of any email client (not Outlook) you can see how is used... In my scenario, i need NTLM to authenticate against the Exchange server, and the basic authentication to gain access to the right mailbox.
I configured my email client (seamonkey or thunderbird), and it works fine, with NTLM enabled.
About the server, i'm testing on Exchange 2010 SP3, configured for NTLM using this settings:
http://technet.microsoft.com/en-us/library/bb124498%28v=exchg.141%29.aspx
About my codde, here is the code:
Pop3Client myClient = new Aspose.Email.Pop3.Pop3Client();
myClient.UseDefaultCredentials = true;
myClient.Host = "SERVERNAME";
myClient.Port = 110;
myClient.Username = "Andrea";
myClient.Password = "password";
myClient.Connect(true);
Pop3MessageInfoCollection messageInfoCol = myClient.ListMessages();
myClient.Disconnect();
myClient.Dispose();
If i run it with username and password, i get this error on the "Connect()" command:
"User command error:-ERR Command is not valid in this state.User command error:-ERR Command is not valid in this state." "User command error:-ERR Command is not valid in this state.User command error:-ERR Command is not valid in this state."
If i remove the lines with username and password, i get this error on the "ListMessages()" command:
"The server returned an invalid response to the UIDL command.The server returned an invalid response to the UIDL command."
Hi Andrea,