Some users can't send emails after adding new email addresses, but can receive

After adding email addresses to some user accounts, we noticed that some users are unable to send emails, while receiving works fine for everyone. What could cause this selective issue with sending emails? What else can we check or test?

The support template suggests some things to check. We also can’t help you unless you fill it out. :slight_smile:

  • Nextcloud Server version 31.0.5
  • Operating system and version Ubuntu 24.04
  • Web server and version Apache 2.4.58
  • PHP version 8.3.6

That is not enough!
There still are missing the

  • confog.php
  • maillog
  • Apache/Nginx-logs
  • Nextcloud.log
  • SMTP config of the users
    Please fill the support template as ased above.
1 Like

Horde_Imap_Client_Exception_ServerResponse
IMAP error reported by server.
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php
Line 4319
Horde_Imap_Client_Socket->_getLine()
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php
Line 4243
Horde_Imap_Client_Socket->_sendCmdChunk()
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php
Line 1753
Horde_Imap_Client_Socket->_sendCmd()
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php
Line 1748
Horde_Imap_Client_Socket->_status()
/var/www/nextcloud/apps/mail/lib/IMAP/FolderMapper.php
Line 135
Horde_Imap_Client_Base->status()
/var/www/nextcloud/apps/mail/lib/IMAP/MailboxSync.php
Line 280
OCA\Mail\IMAP\FolderMapper->getFoldersStatusAsObject()
/var/www/nextcloud/apps/mail/lib/IMAP/MailboxSync.php
Line 130
OCA\Mail\IMAP\MailboxSync->syncMailboxStatus(
“*** sensitive parameters replaced "
)
/var/www/nextcloud/apps/mail/lib/Controller/AccountsController.php
Line 394
OCA\Mail\IMAP\MailboxSync->sync(
"
sensitive parameters replaced "
)
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php
Line 200
OCA\Mail\Controller\AccountsController->create(
"
sensitive parameters replaced "
)
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php
Line 114
OC\AppFramework\Http\Dispatcher->executeController()
/var/www/nextcloud/lib/private/AppFramework/App.php
Line 161
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/nextcloud/lib/private/Route/Router.php
Line 307
OC\AppFramework\App::main()
/var/www/nextcloud/lib/base.php
Line 1040
OC\Route\Router->match()
/var/www/nextcloud/index.php
Line 24
OC::handleRequest()
Raw log entry
{
“reqId”: “Bg6BsMuTDceYRc4I5PPe”,
“level”: 3,
“time”: “2025-06-13T06:24:15+00:00”,
“remoteAddr”: “12.45.78.99”,
“user”: “tester”,
“app”: “mail”,
“method”: “POST”,
“url”: “/index.php/apps/mail/api/accounts”,
“message”: “IMAP error reported by server.”,
“userAgent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36”,
“version”: “31.0.6.2”,
“exception”: {
“Exception”: “Horde_Imap_Client_Exception_ServerResponse”,
“Message”: “IMAP error reported by server.”,
“Code”: 0,
“Trace”: [
{
“file”: “/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php”,
“line”: 4319,
“function”: “_getLine”,
“class”: “Horde_Imap_Client_Socket”,
“type”: “->”
},
{
“file”: “/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php”,
“line”: 4243,
“function”: “_sendCmdChunk”,
“class”: “Horde_Imap_Client_Socket”,
“type”: “->”
},
{
“file”: “/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php”,
“line”: 1753,
“function”: “_sendCmd”,
“class”: “Horde_Imap_Client_Socket”,
“type”: “->”
},
{
“file”: “/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php”,
“line”: 1748,
“function”: “_status”,
“class”: “Horde_Imap_Client_Socket”,
“type”: “->”
},
{
“file”: “/var/www/nextcloud/apps/mail/lib/IMAP/FolderMapper.php”,
“line”: 135,
“function”: “status”,
“class”: “Horde_Imap_Client_Base”,
“type”: “->”
},
{
“file”: “/var/www/nextcloud/apps/mail/lib/IMAP/MailboxSync.php”,
“line”: 280,
“function”: “getFoldersStatusAsObject”,
“class”: “OCA\Mail\IMAP\FolderMapper”,
“type”: “->”
},
{
“file”: “/var/www/nextcloud/apps/mail/lib/IMAP/MailboxSync.php”,
“line”: 130,
“function”: “syncMailboxStatus”,
“class”: “OCA\Mail\IMAP\MailboxSync”,
“type”: “->”,
“args”: [
"
sensitive parameters replaced "
]
},
{
“file”: “/var/www/nextcloud/apps/mail/lib/Controller/AccountsController.php”,
“line”: 394,
“function”: “sync”,
“class”: “OCA\Mail\IMAP\MailboxSync”,
“type”: “->”,
“args”: [
"
sensitive parameters replaced "
]
},
{
“file”: “/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php”,
“line”: 200,
“function”: “create”,
“class”: “OCA\Mail\Controller\AccountsController”,
“type”: “->”,
“args”: [
"
sensitive parameters replaced ***”
]
},
{
“file”: “/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php”,
“line”: 114,
“function”: “executeController”,
“class”: “OC\AppFramework\Http\Dispatcher”,
“type”: “->”
},
{
“file”: “/var/www/nextcloud/lib/private/AppFramework/App.php”,
“line”: 161,
“function”: “dispatch”,
“class”: “OC\AppFramework\Http\Dispatcher”,
“type”: “->”
},
{
“file”: “/var/www/nextcloud/lib/private/Route/Router.php”,
“line”: 307,
“function”: “main”,
“class”: “OC\AppFramework\App”,
“type”: “::”
},
{
“file”: “/var/www/nextcloud/lib/base.php”,
“line”: 1040,
“function”: “match”,
“class”: “OC\Route\Router”,
“type”: “->”
},
{
“file”: “/var/www/nextcloud/index.php”,
“line”: 24,
“function”: “handleRequest”,
“class”: “OC”,
“type”: “::”
}
],
“File”: “/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php”,
“Line”: 4622,
“message”: “IMAP error reported by server.”,
“exception”: {
“details”: “Access denied”,
“logged”: false,
“raw_msg”: “IMAP error reported by server.”
},
“CustomMessage”: “IMAP error reported by server.”
},
“id”: “684bc8744d165”

The error log above displays the user “tester”. Does he exist on the mailserver?
Those errors concern to IMAP, but SMTP-logs (for sending) seem not to exist.

Each user needs to configure his IMAP and SMTP credentials in the Nextcloud mail-app properly.

I have a problem that only 1 account can send messages and it is added with the settings Auto IMAP Security - SSL/TLS 993
SMTP Security - SSL/TLS 465, I go to add on the 2nd account with Auto settings and it says “There was an error while setting up your account”, but the mail is added but can only receive messages

See Nextcloud Mail: Admin Docs - Troubleshooting for how to turn on additional logging.

Are both accounts for the same mail provider or different ones?