Alternc  3.2
Alternc logiel libre pour l'h├ębergement
 All Data Structures Namespaces Files Functions Variables Pages
mailautoconfig_thunderbird.php
Go to the documentation of this file.
1 <?php
2 require_once("../class/config_nochk.php");
3 
4 header ("Content-Type:text/xml");
5 
6 # Test it :
7 # wget -O - -q http://FQDN/mailautoconfig_thunderbird.php?emailaddress=test@example.tld
8 
9 if (empty($_GET['emailaddress'])) die(_("Error: Missing GET of emailaddress"));
10 
11 $emailDomain = explode('@', rawurldecode($_GET['emailaddress']));
12 if (empty($emailDomain)) die(_('Error: Empty $emailDomain'));
13 ?>
14 <clientConfig version="1.1">
15 <emailProvider id="<?php echo $L_FQDN ?>">
16 <domain><?php echo $emailDomain[1];?></domain>
17 <displayName><?php echo $L_FQDN ?></displayName>
18 <displayShortName><?php echo $L_FQDN ?></displayShortName>
19  <incomingServer type="imap">
20  <hostname><?php echo $mail->srv_imap ;?></hostname>
21  <port>993</port>
22  <socketType>SSL</socketType>
23  <authentication>password-cleartext</authentication>
24  <username>%EMAILADDRESS%</username>
25  </incomingServer>
26  <incomingServer type="pop3">
27  <hostname><?php echo $mail->srv_imaps;?></hostname>
28  <port>995</port>
29  <socketType>SSL</socketType>
30  <authentication>password-cleartext</authentication>
31  <username>%EMAILADDRESS%</username>
32  </incomingServer>
33  <outgoingServer type="smtp">
34  <hostname><?php echo $mail->srv_smtp;?></hostname>
35  <port>587</port>
36  <socketType>STARTTLS</socketType>
37  <username>%EMAILADDRESS%</username>
38  <authentication>password-cleartext</authentication>
39  </outgoingServer>
40  <outgoingServer type="smtp">
41  <hostname><?php echo $mail->srv_smtps;?></hostname>
42  <port>465</port>
43  <socketType>SSL</socketType>
44  <authentication>password-cleartext</authentication>
45  <username>%EMAILADDRESS%</username>
46  </outgoingServer>
47 </emailProvider>
48 </clientConfig>