0

for some reason, if I manually set the password (ie $password = "myPassword") everything works fine. However if the password is set from a post (ie $password = $_POST['password']) I get this error:

Uncaught exception 'EWS_Exception' with message 'SOAP client returned status of 401

I cannot for the life of me figure out why this is. The funny thing is that I have the username set the same way (ie $username = $_POST['username']) and it works with no problem. It just doesnt work for password. I bet is a simple mistake on my end, but I just cant figure it out. Any ideas?

Dave Smith
  • 177
  • 1
  • 3
  • 11
  • 1
    On an unrelated note, I would suggest you check out the garethp/php-ews library instead of the jamesaires one. It's under active development and maintenance, and is PSR-4 compatible – Gareth Parker Dec 06 '15 at 14:17

1 Answers1

0

This is embarrassing, but if anyone runs into this issue. Try adding a trim around the post, ie trim($_POST['pwd'])

Dave Smith
  • 177
  • 1
  • 3
  • 11