I also cannot open HTML emails, but text emails are fine. The error seems to arise from the DKIM check, flag setting, or itinerary call, or all 3. The odd thing is, the server responds with the body correctly, but because the other API calls fail, it just inserts an “Error loading message” html instead of the email.
Nextcloud errors:
Error mail OCA\Mail\Exception\ServiceException: Could not set message flag on IMAP: Mail server denied authentication. at custom_apps/mail/lib/Service/MailManager.php line 482 2024-10-31T15:46:49+00:00
0. custom_apps/mail/lib/Controller/MessagesController.php line 799
OCA\Mail\Service\MailManager->flagMessage(["OCA\\Mail\\Account"], "INBOX", 1107, "seen", true)
1. lib/private/AppFramework/Http/Dispatcher.php line 232
OCA\Mail\Controller\MessagesController->setFlags(2148, [true])
2. lib/private/AppFramework/Http/Dispatcher.php line 138
OC\AppFramework\Http\Dispatcher->executeController(["OCA\\Mail\\Controller\\MessagesController"], "setFlags")
3. lib/private/AppFramework/App.php line 184
OC\AppFramework\Http\Dispatcher->dispatch(["OCA\\Mail\\Controller\\MessagesController"], "setFlags")
4. lib/private/Route/Router.php line 331
OC\AppFramework\App::main(
"OCA\\Mail\\Controller\\MessagesController",
"setFlags",
["OC\\AppFramework\\DependencyInjection\\DIContainer"],
["2148","mail.messages.setflags"]
)
5. lib/base.php line 1058
OC\Route\Router->match("\/apps\/mail\/api\/messages\/2148\/flags")
6. index.php line 49
OC::handleRequest(
)
Caused by Horde_Imap_Client_Exception: Mail server denied authentication. at .../horde-imap-client/lib/Horde/Imap/Client/Socket.php line 572
0. custom_apps/mail/lib/IMAP/HordeImapClient.php line 87
Horde_Imap_Client_Socket->_login("*** sensitive parameters replaced ***")
1. custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php line 853
OCA\Mail\IMAP\HordeImapClient->_login("*** sensitive parameters replaced ***")
2. custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php line 1048
Horde_Imap_Client_Base->login("*** sensitive parameters replaced ***")
3. custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php line 2892
Horde_Imap_Client_Base->openMailbox("INBOX", 2)
4. custom_apps/mail/lib/IMAP/MessageMapper.php line 426
Horde_Imap_Client_Base->store("INBOX", [["Horde_Imap_Client_Ids",false],["\\seen"]])
5. custom_apps/mail/lib/Service/MailManager.php line 476
OCA\Mail\IMAP\MessageMapper->addFlag(
["OCA\\Mail\\IMAP\\HordeImapClient",["HICenv","HICflags","HIChdrs","HICdate","HICsize","And 1 more entries, set log level t ... e],
["OCA\\Mail\\Db\\Mailbox",27],
[1107],
"\\seen"
)
6. custom_apps/mail/lib/Controller/MessagesController.php line 799
OCA\Mail\Service\MailManager->flagMessage(["OCA\\Mail\\Account"], "INBOX", 1107, "seen", true)
7. lib/private/AppFramework/Http/Dispatcher.php line 232
OCA\Mail\Controller\MessagesController->setFlags(2148, [true])
8. lib/private/AppFramework/Http/Dispatcher.php line 138
OC\AppFramework\Http\Dispatcher->executeController(["OCA\\Mail\\Controller\\MessagesController"], "setFlags")
9. lib/private/AppFramework/App.php line 184
OC\AppFramework\Http\Dispatcher->dispatch(["OCA\\Mail\\Controller\\MessagesController"], "setFlags")
10. lib/private/Route/Router.php line 331
OC\AppFramework\App::main(
"OCA\\Mail\\Controller\\MessagesController",
"setFlags",
["OC\\AppFramework\\DependencyInjection\\DIContainer"],
["2148","mail.messages.setflags"]
)
11. lib/base.php line 1058
OC\Route\Router->match("\/apps\/mail\/api\/messages\/2148\/flags")
12. index.php line 49
OC::handleRequest(
)
Error mail Horde_Imap_Client_Exception: Mail server denied authentication. at .../horde-imap-client/lib/Horde/Imap/Client/Socket.php line 572 2024-10-31T15:47:22+00:00
0. custom_apps/mail/lib/IMAP/HordeImapClient.php line 87
Horde_Imap_Client_Socket->_login("*** sensitive parameters replaced ***")
1. custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php line 853
OCA\Mail\IMAP\HordeImapClient->_login("*** sensitive parameters replaced ***")
2. custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php line 2510
Horde_Imap_Client_Base->login("*** sensitive parameters replaced ***")
3. custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php line 2493
Horde_Imap_Client_Base->_fetchWrapper("INBOX", ["Horde_Imap_Client_Fetch_Query"], [["Horde_Imap_Client_Ids",false]])
4. custom_apps/mail/lib/IMAP/MessageMapper.php line 536
Horde_Imap_Client_Base->fetch("INBOX", ["Horde_Imap_Client_Fetch_Query"], [["Horde_Imap_Client_Ids",false]])
5. custom_apps/mail/lib/Service/ItineraryService.php line 93
OCA\Mail\IMAP\MessageMapper->getHtmlBody(
["OCA\\Mail\\IMAP\\HordeImapClient",["HICenv","HICflags","HIChdrs","HICdate","HICsize","And 1 more entries, set log lev ... e],
"INBOX",
1106,
"admin"
)
6. custom_apps/mail/lib/Controller/MessagesController.php line 296
OCA\Mail\Service\ItineraryService->extract(["OCA\\Mail\\Account"], ["OCA\\Mail\\Db\\Mailbox",27], 1106)
7. lib/private/AppFramework/Http/Dispatcher.php line 232
OCA\Mail\Controller\MessagesController->getItineraries(2147)
8. lib/private/AppFramework/Http/Dispatcher.php line 138
OC\AppFramework\Http\Dispatcher->executeController(["OCA\\Mail\\Controller\\MessagesController"], "getItineraries")
9. lib/private/AppFramework/App.php line 184
OC\AppFramework\Http\Dispatcher->dispatch(["OCA\\Mail\\Controller\\MessagesController"], "getItineraries")
10. lib/private/Route/Router.php line 331
OC\AppFramework\App::main(
"OCA\\Mail\\Controller\\MessagesController",
"getItineraries",
["OC\\AppFramework\\DependencyInjection\\DIContainer"],
["2147","mail.messages.getitineraries"]
)
11. lib/base.php line 1058
OC\Route\Router->match("\/apps\/mail\/api\/messages\/2147\/itineraries")
12. index.php line 49
OC::handleRequest(
)
Error index OCA\Mail\Exception\ServiceException: Could not fetch message source: Mail server denied authentication. at custom_apps/mail/lib/IMAP/MessageMapper.php line 496 2024-10-31T15:47:22+00:00
0. custom_apps/mail/lib/Service/DkimService.php line 73
OCA\Mail\IMAP\MessageMapper->getFullText(
["OCA\\Mail\\IMAP\\HordeImapClient",["HICenv","HICflags","HIChdrs","HICdate","HICsize","And 1 more entries, set log leve ... e],
"INBOX",
1106,
"admin",
false
)
1. custom_apps/mail/lib/Controller/MessagesController.php line 315
OCA\Mail\Service\DkimService->validate(["OCA\\Mail\\Account"], ["OCA\\Mail\\Db\\Mailbox",27], 1106)
2. lib/private/AppFramework/Http/Dispatcher.php line 232
OCA\Mail\Controller\MessagesController->getDkim(2147)
3. lib/private/AppFramework/Http/Dispatcher.php line 138
OC\AppFramework\Http\Dispatcher->executeController(["OCA\\Mail\\Controller\\MessagesController"], "getDkim")
4. lib/private/AppFramework/App.php line 184
OC\AppFramework\Http\Dispatcher->dispatch(["OCA\\Mail\\Controller\\MessagesController"], "getDkim")
5. lib/private/Route/Router.php line 331
OC\AppFramework\App::main(
"OCA\\Mail\\Controller\\MessagesController",
"getDkim",
["OC\\AppFramework\\DependencyInjection\\DIContainer"],
["2147","mail.messages.getdkim"]
)
6. lib/base.php line 1058
OC\Route\Router->match("\/apps\/mail\/api\/messages\/2147\/dkim")
7. index.php line 49
OC::handleRequest(
)
Caused by Horde_Imap_Client_Exception: Mail server denied authentication. at .../horde-imap-client/lib/Horde/Imap/Client/Socket.php line 572
0. custom_apps/mail/lib/IMAP/HordeImapClient.php line 87
Horde_Imap_Client_Socket->_login("*** sensitive parameters replaced ***")
1. custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php line 853
OCA\Mail\IMAP\HordeImapClient->_login("*** sensitive parameters replaced ***")
2. custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php line 2510
Horde_Imap_Client_Base->login("*** sensitive parameters replaced ***")
3. custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php line 2493
Horde_Imap_Client_Base->_fetchWrapper("INBOX", ["Horde_Imap_Client_Fetch_Query"], [["Horde_Imap_Client_Ids",false]])
4. custom_apps/mail/lib/IMAP/MessageMapper.php line 492
Horde_Imap_Client_Base->fetch("INBOX", ["Horde_Imap_Client_Fetch_Query"], [["Horde_Imap_Client_Ids",false]])
5. custom_apps/mail/lib/Service/DkimService.php line 73
OCA\Mail\IMAP\MessageMapper->getFullText(
["OCA\\Mail\\IMAP\\HordeImapClient",["HICenv","HICflags","HIChdrs","HICdate","HICsize","And 1 more entries, set log lev ... e],
"INBOX",
1106,
"admin",
false
)
6. custom_apps/mail/lib/Controller/MessagesController.php line 315
OCA\Mail\Service\DkimService->validate(["OCA\\Mail\\Account"], ["OCA\\Mail\\Db\\Mailbox",27], 1106)
7. lib/private/AppFramework/Http/Dispatcher.php line 232
OCA\Mail\Controller\MessagesController->getDkim(2147)
8. lib/private/AppFramework/Http/Dispatcher.php line 138
OC\AppFramework\Http\Dispatcher->executeController(["OCA\\Mail\\Controller\\MessagesController"], "getDkim")
9. lib/private/AppFramework/App.php line 184
OC\AppFramework\Http\Dispatcher->dispatch(["OCA\\Mail\\Controller\\MessagesController"], "getDkim")
10. lib/private/Route/Router.php line 331
OC\AppFramework\App::main(
"OCA\\Mail\\Controller\\MessagesController",
"getDkim",
["OC\\AppFramework\\DependencyInjection\\DIContainer"],
["2147","mail.messages.getdkim"]
)
11. lib/base.php line 1058
OC\Route\Router->match("\/apps\/mail\/api\/messages\/2147\/dkim")
12. index.php line 49
OC::handleRequest(
)
apps/mail/api/messages/2154/dkim response:
Internal Server Error
The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log.
Technical details
- Remote Address: 172.18.0.1
- Request ID: 89DW5YbVSG2F8EujGEKh
Nextcloud – a safe home for all your data
itineraries/flags response both are:
{"status":"error","message":"Server error","data":[],"code":0}
I’m on AIO 9.7.0, just updated and still getting the error.