When trying to send an e-mail from within Kontact/KMail, the e-mail is not sent, and an external window pops up after a while with the following lines: --- Quote Beginning --- KDE Mail E-Mail Sending Failed Failed to transport message. The remote host closed the connection." --- Quote end --- The command "journalctl -f" reports the following about this issue: --- Quote Beginning --- Dez 13 11:03:00 <Hostname> kontact[6397]: Item doesn't have DispatchModeAttribute. Dez 13 11:03:01 <Hostname> akonadi_maildispatcher_agent[1887]: SMTP Socket error: QAbstractSocket::RemoteHostClosedError "The remote host closed the connection" Dez 13 11:03:01 <Hostname> akonadi_maildispatcher_agent[1887]: Failed to notify "Created too many similar notifications in quick succession" --- Quote end --- Logging off from and on again into KDE does not resolve the behavior. Neither do machine restarts. Trying to send an email using another e-mail client (here: Thunderbird) on another device (here: a smartphone) using the same sending email address as above works: Emails can successfully be sent. Sending emails being logged into the webmail interface of my e-mail provider using the same e-mail adress as above works. Running the command "telnet <smtp server address of my e-mail provider> <port number>" on the affected machine results in: --- Quote Beginning --- Connected to <smtp server address of my e-mail provider>. Escape character is '^]'. ^CConnection closed by foreign host. --- Quote End --- According to me this shows that the cause for the behavior described here must reside on my machine, not at my e-mail provider. Several minutes later the KDE Mail error message has been extended with more details about the cause of the behavior: --- Quote Beginning --- KDE Mail E-Mail Sending Failed Failed to transport message. The remote host closed the connection Failed to store result in item. Item query returned empty result set --- Quote end --- The command "journalctl -f" reports now: --- Quote Beginning --- Dez 13 12:10:24 <Hostname> akonadi_maildispatcher_agent[1920]: SMTP Socket error: QAbstractSocket::RemoteHostClosedError "The remote host closed the connection" Dez 13 12:10:24 <Hostname> akonadiserver[1808]: Handler exception when handling command FetchItems on connection akonadi_maildispatcher_agent (0x55e56d14d8b0) : Item query returned empty result set Dez 13 12:10:24 <Hostname> akonadi_maildispatcher_agent[1920]: Error storing result. Dez 13 12:10:24 <Hostname> akonadi_maildispatcher_agent[1920]: Failed to notify "Created too many similar notifications in quick succession" Dez 13 12:10:35 <Hostname> akonadiserver[1808]: CacheCleaner found 4 item parts to expire in collection "outbox" While I created this bug report here I noticed bug report #332053, which also refers to the error message "item query returns empty result set" which is also quoted in this bug report here, the bug report you currently are reading. Bug report #332053 refers to Gmail and has been set to "RESOLVED FIXED", while my bug report here does not refer to Gmail, but to an Europe-based e-mail provider. --- Quote end --- Some information about my system: Operating System: EndeavourOS KDE Plasma Version: 6.5.4 KDE Frameworks Version: 6.21.0 Qt Version: 6.10.1 Kernel Version: 6.17.9-arch1-1 (64-bit) Graphics Platform: Wayland KMail: kmail2 6.6.0 (25.12.0)
I had a similar problem yesterday, can you check that your SMTP information is correct? I was using port 465 with STARTTLS, which for my server is wrong. In older KMail versions it seems it was working fine for some reason, but with the latest version it did not. Once i changed it to port 465 with SSL/TLS it started working again.
Thanks a lot, Albert Astals Cid, your suggestion to check the port number of the SMTP server of my e-mail provider helped to resolve this issue: 1. Within the SMTP settings for the affected e-mail address I clicked the "Auto Detect" button which changed the port number from 465 to 587. 2. I logged out of and logged into KDE again. 3. All e-mails in the KMail outbox folder were sent automatically. I will set this bug report to the state "Resolved/Works for me" - but it would be better if the error message(s) which I documented here could get optimized in a sense that the corresponding error messages let the affected users know that the SMTP server settings contains a wrong port number.