Mail Exception error 500

Hello. I’ve been having issues with the mail app in both nextcloud version 20.0.4 and 20.0.6. I attempted to reroll a backup to see if it had anything to do with the newer version, but the issue persisted.

Every time I send an email, it gives me a message “mail not sent, error 500, try again or cancel”.
I’ve been able to send and receive emails just fine up until a few days ago.

The weird thing is it does actually send and receive emails still, but it simply gives the error message. So far I’ve uninstalled and reinstalled the mail app as well.

I see the following error in my error log:

|Error|mail|OCA\Mail\Exception\ServiceException: Could not send message: Error when communicating with the server.

0. /home/tegewmpd/public_html/portaal/apps/mail/lib/Controller/AccountsController.php - line 407:OCA\Mail\Service\MailTransmission->sendMessage(OCA\Mail\Mod ... {}, null, null, OCA\Mail\Db\Message { id: 1032})
1. /home/tegewmpd/public_html/portaal/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Mail\Controller\AccountsController->send(1, "test", "<p style=\" ... >", "removed@gmail.com, "", "", true, false, 1032, null, [], null)
2. /home/tegewmpd/public_html/portaal/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Con ... {}, "send")
3. /home/tegewmpd/public_html/portaal/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Con ... {}, "send")
4. /home/tegewmpd/public_html/portaal/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main("OCA\\Mail\\ ... r", "send", OC\AppFramew ... {}, { action: nu ... "})
5. /home/tegewmpd/public_html/portaal/lib/base.php - line 1008:OC\Route\Router->match("/apps/mail/ ... d")
6. /home/tegewmpd/public_html/portaal/index.php - line 37:OC::handleRequ`Vooraf opgemaakte tekst`est()

Veroorzaakt doorHorde_Mime_Exception: Error when communicating with the server.

0. /home/tegewmpd/public_html/portaal/apps/mail/vendor/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mail.php - line 479:Horde_Mime_Part->send("removed@gmail.com", Horde_Mime_Headers {}, Horde_Mail_T ... "})
1. /home/tegewmpd/public_html/portaal/apps/mail/lib/Service/MailTransmission.php - line 186:Horde_Mime_Mail->send(Horde_Mail_T ... "}, false, false)
2. /home/tegewmpd/public_html/portaal/apps/mail/lib/Controller/AccountsController.php - line 407:OCA\Mail\Service\MailTransmission->sendMessage(OCA\Mail\Mod ... {}, null, null, OCA\Mail\Db\Message { id: 1032})
3. /home/tegewmpd/public_html/portaal/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Mail\Controller\AccountsController->send(1, "test", "<p style=\" ... >", "removed@gmail.com", "", "", true, false, 1032, null, [], null)
4. /home/tegewmpd/public_html/portaal/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Con ... {}, "send")
5. /home/tegewmpd/public_html/portaal/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Con ... {}, "send")
6. /home/tegewmpd/public_html/portaal/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main("OCA\\Mail\\ ... r", "send", OC\AppFramew ... {}, { action: nu ... "})
7. /home/tegewmpd/public_html/portaal/lib/base.php - line 1008:OC\Route\Router->match("/apps/mail/ ... d")
8. /home/tegewmpd/public_html/portaal/index.php - line 37:OC::handleRequest()

Veroorzaakt doorHorde_Mail_Exception: Error when communicating with the server.

0. /home/tegewmpd/public_html/portaal/apps/mail/vendor/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part.php - line 1620:Horde_Mail_Transport_Smtphorde->send("removed@gmail.com", { From: "adm ... "}, null)
1. /home/tegewmpd/public_html/portaal/apps/mail/vendor/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mail.php - line 479:Horde_Mime_Part->send("removed@gmail.com", Horde_Mime_Headers {}, Horde_Mail_T ... "})
2. /home/tegewmpd/public_html/portaal/apps/mail/lib/Service/MailTransmission.php - line 186:Horde_Mime_Mail->send(Horde_Mail_T ... "}, false, false)
3. /home/tegewmpd/public_html/portaal/apps/mail/lib/Controller/AccountsController.php - line 407:OCA\Mail\Service\MailTransmission->sendMessage(OCA\Mail\Mod ... {}, null, null, OCA\Mail\Db\Message { id: 1032})
4. /home/tegewmpd/public_html/portaal/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Mail\Controller\AccountsController->send(1, "test", "<p style=\" ... >", "removed@gmail.com", "", "", true, false, 1032, null, [], null)
5. /home/tegewmpd/public_html/portaal/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Con ... {}, "send")
6. /home/tegewmpd/public_html/portaal/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Con ... {}, "send")
7. /home/tegewmpd/public_html/portaal/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main("OCA\\Mail\\ ... r", "send", OC\AppFramew ... {}, { action: nu ... "})
8. /home/tegewmpd/public_html/portaal/lib/base.php - line 1008:OC\Route\Router->match("/apps/mail/ ... d")
9. /home/tegewmpd/public_html/portaal/index.php - line 37:OC::handleRequest()

Veroorzaakt doorHorde_Smtp_Exception: Error when communicating with the server.

0. /home/tegewmpd/public_html/portaal/apps/mail/vendor/pear-pear.horde.org/Horde_Smtp/Horde/Smtp.php - line 1028:Horde_Smtp_Connection->read()
1. /home/tegewmpd/public_html/portaal/apps/mail/vendor/pear-pear.horde.org/Horde_Smtp/Horde/Smtp.php - line 1094:Horde_Smtp->_getResponse(250, { error: "re ... "})
2. /home/tegewmpd/public_html/portaal/apps/mail/vendor/pear-pear.horde.org/Horde_Smtp/Horde/Smtp.php - line 739:Horde_Smtp->_processData([ "removed@gmail.com"])
3. /home/tegewmpd/public_html/portaal/apps/mail/vendor/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtphorde.php - line 143:Horde_Smtp->send(Horde_Mail_R ... "}, Horde_Mail_Rfc822_List {}, null)
4. /home/tegewmpd/public_html/portaal/apps/mail/vendor/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part.php - line 1620:Horde_Mail_Transport_Smtphorde->send("removed@gmail.com", { From: "adm ... "}, null)
5. /home/tegewmpd/public_html/portaal/apps/mail/vendor/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mail.php - line 479:Horde_Mime_Part->send("removed@gmail.com", Horde_Mime_Headers {}, Horde_Mail_T ... "})
6. /home/tegewmpd/public_html/portaal/apps/mail/lib/Service/MailTransmission.php - line 186:Horde_Mime_Mail->send(Horde_Mail_T ... "}, false, false)
7. /home/tegewmpd/public_html/portaal/apps/mail/lib/Controller/AccountsController.php - line 407:OCA\Mail\Service\MailTransmission->sendMessage(OCA\Mail\Mod ... {}, null, null, OCA\Mail\Db\Message { id: 1032})
8. /home/tegewmpd/public_html/portaal/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Mail\Controller\AccountsController->send(1, "test", "<p style=\" ... >", "removed@gmail.com", "", "", true, false, 1032, null, [], null)
9. /home/tegewmpd/public_html/portaal/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Con ... {}, "send")
10. /home/tegewmpd/public_html/portaal/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Con ... {}, "send")
11. /home/tegewmpd/public_html/portaal/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main("OCA\\Mail\\ ... r", "send", OC\AppFramew ... {}, { action: nu ... "})
12. /home/tegewmpd/public_html/portaal/lib/base.php - line 1008:OC\Route\Router->match("/apps/mail/ ... d")
13. /home/tegewmpd/public_html/portaal/index.php - line 37:OC::handleRequest()|

Any ideas…? Thank you in advance for your help!

Turn on debug mode and try again. it will still fail but you can find a data/horde_imap.log file with the IMAP communication. Inspect it to find out where the server rejected a command.

I have turned on debug mode and inspected the data/horde_imap.log file, and now the error has inexplicably disappeared! It can send and receive emails just fine now - as before - but without the error. The error does not reappear after I turn debugging off again…

Perhaps this was a browser cache issue with the error remaining after rerolling to the backup that I had? I’m perplexed.

This could have many reasons. Sometimes mail servers have tiny hiccup as well and are unavailable for a moment, or you ran into a timeout, or the server limited the number of connections …

If it happens again you can enable debug mode and inspect. There you should see why it fails.

:v:

1 Like

Hello all,
I am not sure, if that is the case with the E-Mail server. I have a new install of Nextcloud 20.0.7.
I have the same error, but this was not with Rainloop Mail. So I expect this to be a Mail-App problem.
Can someone tell me, if the “debug” mode is for the whole Nextcloud or is there a special “Mail Debug?”

Regards,

All of the instance. Do it carefully.

And please open a new topic :v: