smeserver-autodiscover/root/etc/e-smith/templates/var/www/Autodiscover/Autodiscover.php/template-begin

20 lines
779 B
Plaintext
Raw Permalink Normal View History

<?php
$LoginName = "";
$raw = file_get_contents('php://input');
$matches = array();
preg_match('/<EMailAddress>(.*)<\/EMailAddress>/', $raw, $matches);
if (isset($matches[1])) \{
$LoginName = "<LoginName>".$matches[1]."</LoginName>";
\}
$email = array_key_exists('email', $_GET) ? $_GET['email'] : null;
$email = filter_var($email, FILTER_VALIDATE_EMAIL);
if (array_key_exists('email', $_GET)) \{
$LoginName = "<LoginName>".$email."</LoginName>";
\}
header('Content-Type: application/xml');
?>
<?php echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>"; ?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">