Mail app is not connecting to mail account; smtp settings

Hi,
Please help. Nextcloud version 20.0

I have installed the Mail app (Version 1.6) and I have tried to add the mail accounts but I get the error “Unexpected error during account creation.” Activated logs and this is the raw log below. I have sanitised the data by putting **:

[/details]

Nextcloud version (eg, 20.0.0):
Operating system and version (eg, Ubuntu 20.04):
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 7.1):

The output of your Nextcloud log in Admin > Logging:

{“reqId”:“X6sB0hFZCBcDq-E0D25NKwAATA8”,“level”:3,“time”:“2020-11-10T21:10:43+00:00”,“remoteAddr”:“4*.8*..”,“user”:“s",“app”:“mail”,“method”:“GET”,“url”:"/index.php/apps/mail/",“message”:{“Exception”:“OCA\Mail\Exception\ServiceException”,“Message”:“IMAP error: Error connecting to mail server.”,“Code”:11,“Trace”:[{“file”:"/home//public_html/checkmail.f.world/apps/mail/lib/Service/MailManager.php",“line”:127,“function”:“sync”,“class”:“OCA\Mail\IMAP\MailboxSync”,“type”:"->",“args”:[{“class”:“OCA\Mail\Account”},{“class”:“OC\AppFramework\ScopedPsrLogger”}]},{“file”:"/home//public_html/checkmail.f.world/apps/mail/lib/Controller/PageController.php",“line”:119,“function”:“getMailboxes”,“class”:“OCA\Mail\Service\MailManager”,“type”:"->",“args”:[{“class”:“OCA\Mail\Account”}]},{“file”:"/home//public_html/checkmail.f.world/lib/private/AppFramework/Http/Dispatcher.php",“line”:169,“function”:“index”,“class”:“OCA\Mail\Controller\PageController”,“type”:"->",“args”:[]},{“file”:"/home//public_html/checkmail.f.world/lib/private/AppFramework/Http/Dispatcher.php",“line”:100,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Mail\Controller\PageController”},“index”]},{“file”:"/home//public_html/checkmail.f.world/lib/private/AppFramework/App.php",“line”:152,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Mail\Controller\PageController”},“index”]},{“file”:"/home//public_html/checkmail.f.world/lib/private/Route/Router.php",“line”:308,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::",“args”:[“OCA\Mail\Controller\PageController”,“index”,{“class”:“OC\AppFramework\DependencyInjection\DIContainer”},{“action”:null,"_route":“mail.page.index”}]},{“file”:"/home//public_html/checkmail.f.world/lib/base.php",“line”:1009,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->",“args”:["/apps/mail/"]},{“file”:"/home//public_html/checkmail.f.world/index.php",“line”:37,“function”:“handleRequest”,“class”:“OC”,“type”:"::",“args”:[]}],“File”:"/home//public_html/checkmail.f.world/apps/mail/lib/IMAP/MailboxSync.php",“Line”:106,“Previous”:{“Exception”:“Horde_Imap_Client_Exception”,“Message”:“Error connecting to mail server.”,“Code”:11,“Trace”:[{“file”:"/home//public_html/checkmail.f.world/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php",“line”:375,“function”:"_connect",“class”:“Horde_Imap_Client_Socket”,“type”:"->",“args”:[]},{“file”:"/home//public_html/checkmail.f.world/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php",“line”:838,“function”:"_login",“class”:“Horde_Imap_Client_Socket”,“type”:"->",“args”:["** sensitive parameters replaced "]},{“file”:"/home//public_html/checkmail.f.world/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php",“line”:1389,“function”:“login”,“class”:“Horde_Imap_Client_Base”,“type”:"->",“args”:["** sensitive parameters replaced "]},{“file”:"/home//public_html/checkmail.f.world/apps/mail/lib/IMAP/FolderMapper.php",“line”:60,“function”:“listMailboxes”,“class”:“Horde_Imap_Client_Base”,“type”:"->",“args”:["*",5,{“delimiter”:true,“attributes”:true,“special_use”:true}]},{“file”:"/home//public_html/checkmail.f.world/apps/mail/lib/IMAP/MailboxSync.php",“line”:103,“function”:“getFolders”,“class”:“OCA\Mail\IMAP\FolderMapper”,“type”:"->",“args”:[{“class”:“OCA\Mail\Account”},{“cacheFields”:{“1”:“HICstruct”,“8”:“HIChdrs”,“9”:“HICenv”,“10”:“HICflags”,“11”:“HICdate”,“12”:“HICsize”},“changed”:true,“statuscache”:true,“class”:“Horde_Imap_Client_Socket”}]},{“file”:"/home//public_html/checkmail.f.world/apps/mail/lib/Service/MailManager.php",“line”:127,“function”:“sync”,“class”:“OCA\Mail\IMAP\MailboxSync”,“type”:"->",“args”:[{“class”:“OCA\Mail\Account”},{“class”:“OC\AppFramework\ScopedPsrLogger”}]},{“file”:"/home//public_html/checkmail.f.world/apps/mail/lib/Controller/PageController.php",“line”:119,“function”:“getMailboxes”,“class”:“OCA\Mail\Service\MailManager”,“type”:"->",“args”:[{“class”:“OCA\Mail\Account”}]},{“file”:"/home//public_html/checkmail.f.world/lib/private/AppFramework/Http/Dispatcher.php",“line”:169,“function”:“index”,“class”:“OCA\Mail\Controller\PageController”,“type”:"->",“args”:[]},{“file”:"/home//public_html/checkmail.f.world/lib/private/AppFramework/Http/Dispatcher.php",“line”:100,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Mail\Controller\PageController”},“index”]},{“file”:"/home//public_html/checkmail.f.world/lib/private/AppFramework/App.php",“line”:152,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Mail\Controller\PageController”},“index”]},{“file”:"/home//public_html/checkmail.f.world/lib/private/Route/Router.php",“line”:308,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::",“args”:[“OCA\Mail\Controller\PageController”,“index”,{“class”:“OC\AppFramework\DependencyInjection\DIContainer”},{“action”:null,"_route":“mail.page.index”}]},{“file”:"/home//public_html/checkmail.f.world/lib/base.php",“line”:1009,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->",“args”:["/apps/mail/"]},{“file”:"/home//public_html/checkmail.f.world/index.php",“line”:37,“function”:“handleRequest”,“class”:“OC”,“type”:"::",“args”:[]}],“File”:"/home/*/public_html/checkmail.f.world/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php”,“Line”:605},“CustomMessage”:“Could not load account mailboxes: IMAP error: Error connecting to mail server.”},“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36”,“version”:“20.0.0.9”,“id”:“5fab035498532”}

There is no need to address the same problem multiple time, especially if someone has already answered on your question. It only wastes the limited resources of the volunteers trying to support other users. Please follow-up in the following thread, I will close this one.