2 require_once(
"../class/config_nochk.php");
5 # wget http://FQDN/mailautoconfig_outlook.php -O - --post-data="test@example.tls" -q
8 if ( $_SERVER[
'REQUEST_METHOD'] ===
'POST' ){
9 $postText = file_get_contents(
'php://input');
12 $pattern =
'/[A-Za-z0-9_-]+@[A-Za-z0-9_-]+.([A-Za-z0-9_-][A-Za-z0-9_]+)/';
13 preg_match($pattern, $string, $matches);
16 die(_(
'Missing POST of the mail address'));
19 header(
"Content-type: text/xml");
20 echo
"<?xml version='1.0' encoding='UTF-8'?> \n";
22 <Autodiscover xmlns=
"http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
23 <Response xmlns=
"http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
25 <AccountType>email</AccountType>
26 <Action>settings</Action>
29 <Server><?php echo $mail->srv_imaps;?></Server>
31 <LoginName><?php echo $matches[0];?></LoginName>
35 <AuthRequired>on</AuthRequired>
39 <Server><?php echo $mail->srv_smtps;?></Server>
43 <AuthRequired>on</AuthRequired>
44 <UsePOPAuth>on</UsePOPAuth>
45 <SMTPLast>off</SMTPLast>