4

We are running Coldfusion 9.0.1 and have successfully used cfexchangemail to retrieve email for a number of years.

Within the last few days the calls for some users never return. This leads to ColdFusion stacking up active requests which eventually leads to no response for any request.

For other users the calls work successfully.

This is the call:

<cfexchangemail action="get" folder="Inbox " name="weeksMail" connection="testconn1">
    <cfexchangefilter name="maxRows" value=4>
</cfexchangemail>

Has anyone had similar problems?

UPDATE:

I ran some manual queries with a test account that was functioning fine in production. If I remove the maxRows filter I get a very long running request (have yet to see it return). Setting the maxRows to 18 allows the request to complete but only after about 10 seconds. Setting maxRows to 19 seems to get it into non responsive mode.

This seems to indicate a size of message or some kind of corrupt data.

UPDATE 2:

It appears to be a size of email issue. If Inbox has only one email the call will never return if the size is (roughly) about 20kb. A 19kb email can is returned properly.

The question now is: Has this been the case all along and we are only seeing email this large now or did something change? As far as I know nothing has changed on our CF install.

UPDATE 3

Coldfusion 10 has now been tested. We get the same result.

UPDATE 4

I've been able to trigger the problem with a straight WEBDAV hit, which take ColdFusion out of the picture.

Tom Hubbard
  • 15,820
  • 14
  • 59
  • 86
  • Have you recently upgraded your exchange servers to 2010? – Jarede Jan 10 '14 at 16:35
  • Have you got a request timeout set? – Adam Cameron Jan 10 '14 at 16:44
  • Have there been any changes to any networking equipment between Cf server and Exchange server? – Scott Stroz Jan 10 '14 at 16:59
  • We have not made any updates near that time. It's looking like that to me too though, maybe some unknown patches, etc. – Tom Hubbard Jan 10 '14 at 17:02
  • @AdamCameron The request timeout is set but it does not get triggered. I'm guessing this is because it is at a Java network block level but I'm not sure. – Tom Hubbard Jan 10 '14 at 17:15
  • Hey @TomHubbard - I added some Exchange tags to your question to get more eyes on this. It seems like you have been focusing your attention on the ColdFusion side but the issue may be on the Exchange/OWA side. – Miguel-F Jan 21 '14 at 14:34
  • Thanks @Miguel-F. I've been able to reproduce the problem with straight WEB-DAV (No ColdFusion). – Tom Hubbard Jan 21 '14 at 16:19
  • Tom, I'm experiencing this same issue. I noticed you said that you were experiencing this issue outside of ColdFusion, but then you mentioned that you wound up using EWS Managed API. Just by changing to EWS Managed API solved this issue? – Ryan Aug 19 '16 at 18:55

1 Answers1

4

As per my experience cfexchangemail tag(CF10/CF11) is always slow and sometime you get request timeout error. I ended up using Java EWS Managed API, which is faster than cfexchangemail tag for sure. However, you just need to learn how to use methods return by API.

Here is an example how to create an object of microsoft.exchange.webservices

<cfscript>

    service = createObject("Java", "microsoft.exchange.webservices.data.ExchangeService");
    service.init();

    version = createObject("Java", "microsoft.exchange.webservices.data.ExchangeVersion");
    service.init(version.Exchange2010);

    credentials = createObject("Java", "microsoft.exchange.webservices.data.WebCredentials");

    credentials.init(yourusername, yourpassword);
    service.setCredentials(credentials);

    uri = createObject("Java", "java.net.URI");
    uri.init("outlook webservices url");
    service.setUrl(uri);
    WellKnownFolderName=createObject("Java","microsoft.exchange.webservices.data.WellKnownFolderName");
    result = service.FindItems(service.WellKnownFolderName.Inbox, CreateObject("java", "microsoft.exchange.webservices.data.ItemView").init(100));

    for(item in result.getItems(){
        // ..loop through each field and store their value 
        // in query object or something...
    }

</cfscript>
Leigh
  • 28,765
  • 10
  • 55
  • 103
Ronnie Kumar
  • 635
  • 5
  • 18