I checked with a separate simpler test program using the sample code as an 
example. http://curl.haxx.se/libcurl/c/smtp-tls.html

It seems the problem is caused because I called CURLOPT_CONNECTTIMEOUT, and I 
was using 5 seconds. What threw me was that if the host is unreachable you get 
the correct error "Operation timed out after 5000 milliseconds", so it was the 
"...timed out after 0 milliseconds..." that threw me and I figured it wasn't 
related to that setting.

I suppose what is happening is when invalid credentials are supplied to 
Office365, it must take more than 5 seconds to return that the credentials were 
invalid, whereas the Google servers must be slightly faster. If I increase the 
timeout then I also get CURLE_LOGIN_DENIED with Office365.

So I guess it's just a quirk of timing out whilst it's still attempting to 
login.

Jamie


-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to