Issues in autodiscover.xml.php (solutions included, simple fix)

Issue #273 resolved
Peter Franken created an issue

Your autodiscover script is a very simple but elegant solution, very nice!

I kept getting a parsing error on the Outlook autodiscover tester and figured out the problem. You simply forgot to add the property name and quotes xmlns="" to the extracted ResponseSchema" at lines 16 - 18 of the /opt/www/autodiscover/autodiscover.xml.php script.

Lines 50 and 51 output:

<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
    <Response http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a>

Which should be:

<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
    <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">

Fix on line 18 of autodiscover.xml.php:

$schema = 'xmlns="' . $matches[1] . '"';

LoginName

While you're at it, it would also be awesome if you could move the $email_address variable up in scope so it can be made available to a LoginName entry in the Outlook settings. This makes it so that the user doesn't have to enter his e-mailaddress (by default only everything that comes before the @ is entered).

Typo's

You forgot to add php to the mobilesync config on lines 31 & 32.

I've added an updated version of the script which contains all fixes to this issue.

Comments (10)

  1. Log in to comment