I use the cPanel option with
// cPanel Driver options
// --------------------------
// The cPanel Host name
$rcmail_config['password_cpanel_host'] = 'localhost';
// The cPanel admin username
$rcmail_config['password_cpanel_username'] = 'adminUsername';
// The cPanel admin password
$rcmail_config['password_cpanel_password'] = 'adminPwd';
// The cPanel port to use
$rcmail_config['password_cpanel_port'] = 2095;
Also tried the domain name both as
www.mydomain.com & mydomain.com
Have tried several ports: 2087, 2095, 2095
I have a self-signed certificate installed on this domain and main.inc.php has 'force_https' set.