1

Screenshot

Connection timed out when tried to fetch emails from the cpanel roundcube. All credentials are perfect and hostname and server also working fine.

$hostname = '{mail.server.com:993/novalidate-cert/imap/ssl}';
$username = 'username';
$password = 'password';

$stream = imap_open($hostname, $username, $password) or die('Cannot connect: ' . imap_last_error());
print_r(imap_errors());

Can anyone help please? Thank you

Markus Müller
  • 2,611
  • 1
  • 17
  • 25
  • Which version of WHM / Cpanel is it? What version of TLS does your server employ? – Martin Dec 03 '20 at 14:17
  • Is this only a recent issue, was this working previously say a few days ago? – Martin Dec 03 '20 at 14:18
  • it was working 2 weeks ago – Arslan Aslam Dec 03 '20 at 16:50
  • cPanel Version = 90.0 (build 17), Apache Version 2.4.46 – Arslan Aslam Dec 03 '20 at 16:52
  • Go into `/var/log/maillog` in your server and open this file and see if you can find why it failed to open the mailbox. – Martin Dec 03 '20 at 17:12
  • You may need to check that your security details (Port, password encryption method, connection type, TLS certificate etc.) passed via the PHP functions fit the details expacted by the mailbox . – Martin Dec 03 '20 at 17:14
  • `$hostname = '{mail.lopitech.com:995/pop3/novalidate-cert/tls}INBOX';` its good format I guess – Arslan Aslam Dec 04 '20 at 04:42
  • I've checked many examples, they use same format. – Arslan Aslam Dec 04 '20 at 04:42
  • and in the log file, there is an sql table name error. but its was previously working with the same error. – Arslan Aslam Dec 04 '20 at 04:45
  • You should check what your server is actually doing; yes the format looks fine, but that assumes that all the server settings are standard. Check the correct port is open. Check POP3 is enabled, check connection . Your URL looks like you're trying to connect to an non-valid TLS so you should check if that's allowed and set the port accordingly (usually 143). Read the maillog file as previously mentioned to get the reason why the connectiob failed. – Martin Dec 04 '20 at 17:41
  • You've tagged this with the phpmyadmin tag, but I don't see what this question has to do with phpMyAdmin (which is an application meant for administrators to have graphical control over managing a MySQL or MariaDB database). Am I missing something? – Isaac Bennetch Dec 06 '20 at 07:18

0 Answers0