PHP code example of slickalpha / autoconfigsrv
1. Go to this page and download the library: Download slickalpha/autoconfigsrv 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/ */
slickalpha / autoconfigsrv example snippets
// Enable plugin in config by adding the keyword to plugins array
$config['plugins'] = array('autoconfigsrv');
// Set default hosts to autoconfigsrv. Use both or either one.
$config['default_host'] = 'autoconfigsrv';
$config['smtp_server'] = 'autoconfigsrv';
// Set prefix for hosts; Default 'ssl'
$config['autoconfigsrv_imap_host_prefix'] = 'ssl';
$config['autoconfigsrv_smtp_host_prefix'] = 'tls';
// Set regex to whitelist hosts fetched from SRV records
$config['autoconfigsrv_host_regex'] = '(^[a-z0-9\.]*\.example\.com)$';
// Set true, to fetch SRV records from host domain's nameserver
$config['autoconfigsrv_use_authoritative_ns'] = false;