PHP code example of gecka / ident-switch

1. Go to this page and download the library: Download gecka/ident-switch library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gecka / ident-switch example snippets


   $config['plugins'] = array('ident_switch', /* other plugins */);
   

$config['ident_switch.preconfig'] = [
    'domain.tld' => [
        'imap_host' => 'ssl://mail.domain.tld:993',
        'smtp_host' => 'tls://mail.domain.tld:587',
        'sieve_host' => 'tls://mail.domain.tld:4190',
        'user' => 'email',        // 'email' = full address, 'mbox' = local part
        'readonly' => true,       // lock fields in UI
    ],
    '*' => [                      // wildcard: default for unlisted domains
        'imap_host' => 'ssl://mail.example.com:993',
        'smtp_host' => 'tls://mail.example.com:587',
        'user' => 'email',
    ],
];
bash
   bin/updatedb.sh --package=ident_switch --dir=plugins/ident_switch/SQL
   
bash
cp plugins/ident_switch/config.inc.php.dist plugins/ident_switch/config.inc.php
bash
   bin/updatedb.sh --package=ident_switch --dir=plugins/ident_switch/SQL