Hi Ondrej,
Hi Kashif,
System.NullReferenceException: Object reference not set to an instance of an object. | ||
at e?.�.Initialize(String , Int32 ) | ||
at e?.�?.��() | ||
at ?.�.??() | ||
at Aspose.Email.Imap.ImapClient.get_CurrentFolder() | ||
at Aspose.Email.Imap.ImapClient.SelectFolder(String folderName, Boolean readOnly) | ||
at Aspose.Email.Imap.ImapClient.SelectFolder(String folderName) There is visible in Wireshark capture that communication ends almost immediately when server begins negotiate TLS. This is possible simulate on usual Exchange server withou any special setting. Can you fix this problem? Best regards, Ondrej |
Hi Ondrej,
I have tested this at my end by setting the security options to None which represents a non-secure connection and connecting to Exchange server. The following code was executed without any error and retreived the number of messages from the inbox.
Sample Code:
using (ImapClient client = new ImapClient(
“[exchange.aspose.com ](http://exchange.aspose.com/)”,
143,
"usernameasposeemail.test4@aspose.com",
“password”,
SecurityOptions.None))
{
client.SelectFolder(“Inbox”);
ImapMessageInfoCollection messageInfoCol = client.ListMessages();
}
The definition of Security Options inside the API is as follow:
None = 0 ---- Connection is not secured
SSLExplicit = 1 ------ Uses the STARTTLS command to start SSL connection
SSLImplicit = 2 ------ Establishes a SSL connection first
Auto = 256 ------- Auto Selection mode
Please try the settings in the code sample above and let us know your feedback.
Hi Kashif,
Hi Ondrej,
Could you please make sure that your server is configured properly for this purpose? You can easily verify this by using the same settings as you are using in our API. For using STARTTLS, this is a requirement to be configured for your desired port. Our components support all these variants and to check if your server is configured properly, please try to configure Microsoft Outlook with the same settings. If this works good, I would request you to please create a test account on your server and share its credentials with us so that we can investigate the issue at our end and assist you further.
Hi Kashif,
Hi Ondrej,
The issue has been logged as EMAILNET-34699 in our issue tracking system for further investigation by our development team. We’ll notify you as soon as there is some information available in this regard and appreciate your patience until then.
Hi Kashif,
Hi Ondrej,
The issues you have found earlier (filed as EMAILNET-34699) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Dear Aspose,
I am connecting to exchange server through EWS and using impersonation but i am getting only 20 user ,it has around 300 user could you please explain.
I have observed the issue shared by you and request you to please try using Aspose.Email for .NET 20.1 on your end. In case there is still an issue please share the working sample project along with credentials that we may test on our end to help you out.
Here is the code
for (EmailAddress emailAddress : contactmailAdd) {
clientforexchange_input.impersonateUser(3, emailAddress.getAddress());
try {
ExchangeMailboxInfo mialinfo = clientforexchange_input.getMailboxInfo();
clientforexchange_input.getMailboxInfo(mialinfo.getMailboxUri());
System.out.println(emailAddress.getAddress());
userList.add(emailAddress.getAddress());
} catch (Exception e) {
System.out.println("ooooooooooooooooooooooooooooooooooooo");
}
i am getting only 20 contacts in my list while there are 300
I have observed the sample code and it seems to be fine. However, in order to proceed further with investigation on our end, we requested for account credentials that we may use to test and verify the issue on our end.