Account creation failed; Caused by Horde_Imap_Client_Exception

Hi, I am not able to create email account with the Mail app. Details below:

Host for nextcloud: Godaddy
Email host: Godaddy
OS: Debian
Apache2
Mysql

I have tried:

  1. Manual IMAP Settings and SMTP settings and have tried “none”, “SSL/TLS” & " StartTls"

  2. Activated error logs and from nextcloud.log i get this error (I have sanitized to hide sensitive info):

{“reqId”:“X6uToknLvQ1l4@o56rlxzQAAiA8”,“level”:3,“time”:“2020-11-11T07:32:56+00:00”,“remoteAddr”:"**.8*.98.13",“user”:"****",“app”:“mail”,“method”:“POST”,“url”:"/index.php/apps/mail/api/accounts",“message”:“Creating account failed: Error when communicating with the 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”:“5faba05014550”}

and this error

[mail] Error: OCA\Mail\Exception\ServiceException: IMAP error: Error connecting to mail server. at <>

  1. /home/*****/public_html/checkmail.blowfish.world/apps/mail/lib/Service/MailManager.php line 127
    OCA\Mail\IMAP\MailboxSync->sync(OCA\Mail\Account {}, OC\AppFramework\ScopedPsrLogger {})
  2. /home/*****/public_html/checkmail.blowfish.world/apps/mail/lib/Controller/MailboxesController.php line 92
    OCA\Mail\Service\MailManager->getMailboxes(OCA\Mail\Account {})
  3. /home/*****/public_html/checkmail.blowfish.world/lib/private/AppFramework/Http/Dispatcher.php line 169
    OCA\Mail\Controller\MailboxesController->index(7)
  4. /home/*****/public_html/checkmail.blowfish.world/lib/private/AppFramework/Http/Dispatcher.php line 100
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Control … {}, “index”)
  5. /home/*****/public_html/checkmail.blowfish.world/lib/private/AppFramework/App.php line 152
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Control … {}, “index”)
  6. /home/*****/public_html/checkmail.blowfish.world/lib/private/Route/Router.php line 308
    OC\AppFramework\App::main(“OCA\Mail\Cont … r”, “index”, OC\AppFramework\ … {}, {action: null,_r … "})
  7. /home/*****/public_html/checkmail.blowfish.world/lib/base.php line 1009
    OC\Route\Router->match("/apps/mail/api/mailboxes")
  8. /home/*****/public_html/checkmail.blowfish.world/index.php line 37
    OC::handleRequest()

GET /index.php/apps/mail/api/mailboxes?accountId=7
from 41.80.98.13 by *** at 2020-11-11T07:27:30+00:00

Raw error I will post below.

  1. In my config.php file I have
    ‘log_type’ => ‘file’,
    ‘logfile’ => ‘nextcloud.log’,
    ‘loglevel’ => 3,
    ‘logdateformat’ => ‘F d, Y H:i:s’,
    ‘app.mail.verify-tls-peer’ => false,

  2. The Nextcloud smtp settings (/index.php/settings/admin) the “Email server” settings for smtp works but the Mail App smtp does not work

  3. I have tested the GoDaddy mail settings with this site https://pingability.com/mailtest.jsp. It connects to my email.

PLEASE PLEASE help.

In the raw error log I have noticed “Caused by Horde_Imap_Client_Exception”

The raw error log is below:

{“reqId”:“X6uSYknLvQ1l4@o56rlxhgAAiCM”,“level”:3,“time”:“2020-11-11T07:27:30+00:00”,“remoteAddr”:“41.80.98.13”,“user”:“",“app”:“mail”,“method”:“GET”,“url”:"/index.php/apps/mail/api/mailboxes?accountId=7",“message”:{“Exception”:“OCA\Mail\Exception\ServiceException”,“Message”:“IMAP error: Error connecting to mail server.”,“Code”:11,“Trace”:[{“file”:"/home//public_html/checkmail..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..world/apps/mail/lib/Controller/MailboxesController.php",“line”:92,“function”:“getMailboxes”,“class”:“OCA\Mail\Service\MailManager”,“type”:"->",“args”:[{“class”:“OCA\Mail\Account”}]},{“file”:"/home//public_html/checkmail..world/lib/private/AppFramework/Http/Dispatcher.php",“line”:169,“function”:“index”,“class”:“OCA\Mail\Controller\MailboxesController”,“type”:"->",“args”:[7]},{“file”:"/home//public_html/checkmail..world/lib/private/AppFramework/Http/Dispatcher.php",“line”:100,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Mail\Controller\MailboxesController”},“index”]},{“file”:"/home//public_html/checkmail..world/lib/private/AppFramework/App.php",“line”:152,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Mail\Controller\MailboxesController”},“index”]},{“file”:"/home//public_html/checkmail..world/lib/private/Route/Router.php",“line”:308,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::",“args”:[“OCA\Mail\Controller\MailboxesController”,“index”,{“class”:“OC\AppFramework\DependencyInjection\DIContainer”},{“action”:null,"_route":“mail.mailboxes.index”}]},{“file”:"/home//public_html/checkmail..world/lib/base.php",“line”:1009,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->",“args”:["/apps/mail/api/mailboxes"]},{“file”:"/home//public_html/checkmail..world/index.php",“line”:37,“function”:“handleRequest”,“class”:“OC”,“type”:"::",“args”:[]}],“File”:"/home//public_html/checkmail..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..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..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..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..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..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..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..world/apps/mail/lib/Controller/MailboxesController.php",“line”:92,“function”:“getMailboxes”,“class”:“OCA\Mail\Service\MailManager”,“type”:"->",“args”:[{“class”:“OCA\Mail\Account”}]},{“file”:"/home//public_html/checkmail..world/lib/private/AppFramework/Http/Dispatcher.php",“line”:169,“function”:“index”,“class”:“OCA\Mail\Controller\MailboxesController”,“type”:"->",“args”:[7]},{“file”:"/home//public_html/checkmail..world/lib/private/AppFramework/Http/Dispatcher.php",“line”:100,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Mail\Controller\MailboxesController”},“index”]},{“file”:"/home//public_html/checkmail..world/lib/private/AppFramework/App.php",“line”:152,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Mail\Controller\MailboxesController”},“index”]},{“file”:"/home//public_html/checkmail..world/lib/private/Route/Router.php",“line”:308,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::",“args”:[“OCA\Mail\Controller\MailboxesController”,“index”,{“class”:“OC\AppFramework\DependencyInjection\DIContainer”},{“action”:null,"_route":“mail.mailboxes.index”}]},{“file”:"/home//public_html/checkmail..world/lib/base.php",“line”:1009,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->",“args”:["/apps/mail/api/mailboxes"]},{“file”:"/home//public_html/checkmail..world/index.php",“line”:37,“function”:“handleRequest”,“class”:“OC”,“type”:"::",“args”:[]}],“File”:"/home//public_html/checkmail.**.world/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php”,“Line”:605},“CustomMessage”:“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”:“5faba1851cbd1”}

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.