I am testing the Aspose Email Library with the goal to eliminate the existing java mail api.
Whereas the Unittests with IMAP and POP3 works as expected, I have no luck to get the Aspose Email client running. The old library works well, but if I decide to change to Aspose I would prefere to run all mail - connections via the same library.
Below I have the sourcecode, wich correspondent with the example in the ‘Programmers Guide’.
===== start source example
ExchangeClient client = new ExchangeClient(“https://outlook.office365.com/ews/exchange.asmx 1”,
“user”, “password”, “”);
ExchangeMailboxInfo mailboxInfo = exchange.getMailboxInfo();
====== end source example
EXCEPTION: The exception at the method-call ‘getMailboxInfo()’ says:
ExchangeException: The remote server returned an error: (405) Method Not Allowed.
I could not find out, what is wrong with the example above, particularly the account works
We have analyzed your code sample and found that you are using the wrong class for accessing Exchange Server. ExchangeClient is used to connect to Exchange servers via WebDav protocol e.g. Exchange Server 2003 and 2007 only. In order to connect to Exchange Server via Exchange Web Service (EWS), you have to use the IEWSClient class for Exchange server 2007 and above. Please try the following code sample and share your feedback with us. The credentials provided in this code sample are of a valid test Office365 account that you can use for your testing purpose.
The following code sample only takes 6 seconds to get completed as shown in the screenshot. Can you please try this at your end and share your feedback with us. If your particular test account is taking long to complete the same code, please share your test credentials with us for our investigation. Also, please try the same on another internet connection and see if you get it working without any delay induced.
I tried your code without any changes (with your login-credentials) and the result is the same (wait over 60 seconds until I get an instance of EWSClient).
And because in your code no timeout is set, the method ‘getMailboxInfo()’ seem never come back.
Can you please share with us if you are using the latest version of Aspose.Email for Java API? We faced this issue with v 5.7.0 of the API and has been resolved in the subsequent version of the API. Please try it with the latest version of Aspose.Email for Java 5.8.0 and share your feedback with us.
We have tested the issue at our end with Mac OS X 10.8 and it raises no such exception. We shall try to setup environment for Mac OS X 10.11 to reproduce the problem at our end and share our feedback with you.
The behavior of the API is not dependent on the OS and this seems to be an issue of the API with this specific version of OS-X. Irrespective of this issue, we always provide support to our users by resolving issues at our end. As mentioned, we are trying to setup the environment with this version of Mac OS X. If you have any link to some ISO of this OS version for setting in VM, it may help us to setup the environment quickly and investigate the issue. In any way, we are trying to establish a test environment as soon as possible for testing this issue and provide you with assistance.
Thank you for waiting for completion of our investigation.
We have tested this issue at our end with Mac OS E1-Capitan v 10.11.2 and no exception or error is raised at our end. The code sample shared earlier works well at our end and the mailbox size is retrieved fine. I would request you to please re-verify if you are using the latest version of the API at your end. Please share your feedback with us for further assistance.