AlternC/bureau/admin/mailautoconfig_thunderbird.php

49 lines
1.6 KiB
PHP
Raw Normal View History

2013-07-22 15:27:13 +00:00
<?php
require_once("../class/config_nochk.php");
2013-07-22 15:27:13 +00:00
header ("Content-Type:text/xml");
2013-07-22 16:51:23 +00:00
# Test it :
# wget -O - -q http://FQDN/mailautoconfig_thunderbird.php?emailaddress=test@example.tld
2013-07-22 16:51:23 +00:00
if (empty($_GET['emailaddress'])) die(_("Error: Missing GET of emailaddress"));
2013-07-22 15:27:13 +00:00
$emailDomain = explode('@', rawurldecode($_GET['emailaddress']));
2013-07-22 16:51:23 +00:00
if (empty($emailDomain)) die(_('Error: Empty $emailDomain'));
2013-07-22 15:27:13 +00:00
?>
<clientConfig version="1.1">
<emailProvider id="<?php echo $L_FQDN ?>">
2013-07-22 16:51:23 +00:00
<domain><?php echo $emailDomain[1];?></domain>
<displayName><?php echo $L_FQDN ?></displayName>
<displayShortName><?php echo $L_FQDN ?></displayShortName>
2013-07-22 15:27:13 +00:00
<incomingServer type="imap">
<hostname><?php echo $mail->srv_imap ;?></hostname>
2013-07-22 15:27:13 +00:00
<port>993</port>
<socketType>SSL</socketType>
<authentication>password-cleartext</authentication>
<username>%EMAILADDRESS%</username>
</incomingServer>
<incomingServer type="pop3">
<hostname><?php echo $mail->srv_imaps;?></hostname>
2013-07-22 15:27:13 +00:00
<port>995</port>
<socketType>SSL</socketType>
<authentication>password-cleartext</authentication>
<username>%EMAILADDRESS%</username>
</incomingServer>
<outgoingServer type="smtp">
<hostname><?php echo $mail->srv_smtp;?></hostname>
2013-07-22 15:27:13 +00:00
<port>587</port>
<socketType>STARTTLS</socketType>
<username>%EMAILADDRESS%</username>
<authentication>password-cleartext</authentication>
</outgoingServer>
<outgoingServer type="smtp">
<hostname><?php echo $mail->srv_smtps;?></hostname>
2013-07-22 15:27:13 +00:00
<port>465</port>
<socketType>SSL</socketType>
<authentication>password-cleartext</authentication>
<username>%EMAILADDRESS%</username>
</outgoingServer>
</emailProvider>
</clientConfig>