瀏覽代碼

Autodiscovery: send display name to IMAP client

Michael Kuron 8 年之前
父節點
當前提交
08506f7c81
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      data/web/autodiscover.php

+ 4 - 1
data/web/autodiscover.php

@@ -29,7 +29,7 @@ error_reporting(0);
 
 $data = trim(file_get_contents("php://input"));
 
-// Desktop clients need IMAP, unless it's Outlook 2013 or higher on Windows
+// Desktop client needs IMAP, unless it's Outlook 2013 or higher on Windows
 if (strpos($data, 'autodiscover/outlook/responseschema')) { // desktop client
 	$config['autodiscoverType'] = 'imap';
 	if ($config['useEASforOutlook'] == 'yes' &&
@@ -77,6 +77,9 @@ if (!isset($_SERVER['PHP_AUTH_USER']) OR $as !== "user") {
       if ($config['autodiscoverType'] == 'imap') {
       ?>
   <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
+      <User>
+          <DisplayName><?php echo $displayname; ?></DisplayName>
+      </User>
       <Account>
           <AccountType>email</AccountType>
           <Action>settings</Action>