Email failure in NC and logs

I have had trouble in the past getting NC’s email to work. I couldn’t make it save my password. I did fix that but the issue has returned. Meanwhile I have some logs which maybe this, or maybe a different problem. FWIW, my email works elsewhere including my client email app and RoundCube. What else can I tell you to help me work out what’s going wrong?

Thanks

OCA\Mail\Exception\ServiceException: IMAP errorError connecting to mail server.

  1. /usr/share/nextcloud/apps/mail/lib/Service/MailManager.php- line 102: OCA\Mail\IMAP\MailboxSync->sync(OCA\Mail\Account {})
  2. /usr/share/nextcloud/apps/mail/lib/Controller/PageController.php - line 119: OCA\Mail\Service\MailManager->getFolders(OCA\Mail\Account {})
  3. /usr/share/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 170: OCA\Mail\Controller\PageController->index()
  4. /usr/share/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 99: OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Con … {}, “index”)
  5. /usr/share/nextcloud/lib/private/AppFramework/App.php - line 125: OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Con … {}, “index”)
  6. /usr/share/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App::main(“OCA\Mail\ … r”, “index”, OC\AppFramew … {}, { _route: “mail.page.index”})
  7. <>OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: “mail.page.index”})
  8. /usr/share/nextcloud/lib/private/Route/Router.php - line 299: call_user_func(OC\AppFramew … {}, { _route: “mail.page.index”})
  9. /usr/share/nextcloud/lib/base.php - line 1008: OC\Route\Router->match("/apps/mail/")
  10. /usr/share/nextcloud/index.php - line 38: OC::handleRequest()

Caused by Horde_Imap_Client_Exception: Error connecting to mail server.

  1. /usr/share/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php - line 375: Horde_Imap_Client_Socket->_connect()
  2. /usr/share/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php - line 838: Horde_Imap_Client_Socket->_login("*** sensiti … *")
  3. /usr/share/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php - line 1389: Horde_Imap_Client_Base->login("*** sensiti … *")
  4. /usr/share/nextcloud/apps/mail/lib/IMAP/FolderMapper.php - line 60: Horde_Imap_Client_Base->listMailboxes("*", 4, { delimiter: … e})
  5. /usr/share/nextcloud/apps/mail/lib/IMAP/MailboxSync.php - line 85: OCA\Mail\IMAP\FolderMapper->getFolders(OCA\Mail\Account {}, Horde_Imap_C … e})
  6. /usr/share/nextcloud/apps/mail/lib/Service/MailManager.php- line 102: OCA\Mail\IMAP\MailboxSync->sync(OCA\Mail\Account {})
  7. /usr/share/nextcloud/apps/mail/lib/Controller/PageController.php - line 119: OCA\Mail\Service\MailManager->getFolders(OCA\Mail\Account {})
  8. /usr/share/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 170: OCA\Mail\Controller\PageController->index()
  9. /usr/share/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 99: OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Con … {}, “index”)
  10. /usr/share/nextcloud/lib/private/AppFramework/App.php - line 125: OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Con … {}, “index”)
  11. /usr/share/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App::main(“OCA\Mail\ … r”, “index”, OC\AppFramew … {}, { _route: “mail.page.index”})
  12. <>OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: “mail.page.index”})
  13. /usr/share/nextcloud/lib/private/Route/Router.php - line 299: call_user_func(OC\AppFramew … {}, { _route: “mail.page.index”})
  14. /usr/share/nextcloud/lib/base.php - line 1008: OC\Route\Router->match("/apps/mail/")
  15. /usr/share/nextcloud/index.php - line 38: OC::handleRequest() 2020-05-06T14:05:48+0100

The main issue seems to be that it can’t connect via IMAP. Double check all of your IMAP settings.

Possibly because there is no password entered in the settings. This was a problem before which has now returned. The password won’t save. It’s never accepted. Yes, its the correct password! Everytime I look in the settings the passwords are blank again.