Mail-app sending returns error 500 - but sending actually works

Hi, I’m settung up OwnClowd at the moment, and so far it’s been a blast.

I’m getting a strange error with my Mail-App. I connected my private mail and I am able to send and receive, however the Mail app returns “Error: Request failed with status code 500” when sending an E-Mail. (it is working though!)
I searched for Forum and could only find Topics where the 500 error actually was real and sending was not possible.

:thinking:

Any hints?
Nextcloud 19.0.3

PS: I try to attach logs but “new users can only add 4 links” :face_with_raised_eyebrow:

/edit only happens when sending an E-Mail to my saved Contacts

I see, bla@bla.domain is a link. :sweat_smile:
horde_smtp.log:

    [AUTH Command - method: DIGEST-MD5; username: xxxxx(a)xxx-ev.xe]
    S: 334 cnNwYXV0aD0xOGI4M2UzZmYwMDQ4ZjgzZDViMzlmYmEzN2ExZDVhNA==
    C:
    S: 235 2.7.0 Authentication successful
    C: MAIL FROM:<xxxxx(a)xxx-ev.xx> SIZE=739 BODY=7BIT
    C: RCPT TO:<xxxxx(a)gmail.xom>
    S: 250 2.1.0 Ok
    S: 250 2.1.5 Ok
    C: DATA
    S: 354 End data with <CR><LF>.<CR><LF>
    C: From: "Steven" <xxxxx(a)xxxx-ev.xx>
    To: "Steven Google (xxxxxx(a)gmail.xom)" <xxxxxxxx(a)gmail.xom>
    Cc:
    Subject: smtp
    Message-ID: <20200925224016.Horde.enPI4iduMM9XrKzFn28nvFU(a)xxxxxxxg>
    User-Agent: Horde Application Framework 5
    Date: Fri, 25 Sep 2020 22:40:16 +0000
    Content-Type: multipart/alternative; boundary="=_sw8k9GLWgbQYMooiDYL93qM"
    MIME-Version: 1.0
    This message is in MIME format.
    --=_sw8k9GLWgbQYMooiDYL93qM
    Content-Type: text/plain; charset=utf-8
    Content-Description: Plaintext Version of Message
    smtp
    --=_sw8k9GLWgbQYMooiDYL93qM
    Content-Type: text/html; charset=utf-8
    Content-Description: HTML Version of Message
    --=_sw8k9GLWgbQYMooiDYL93qM--
    C: .
    S: 250 2.0.0 Ok: queued as A21D66085C
    C: QUIT
    S: 221 2.0.0 Bye

Oh, it only happens when writing to saved Contacts :thinking:

{"reqId":"MyfqmxNfjmZ9tL6omsaG","level":3,"time":"2020-09-25T23:15:44+00:00","remoteAddr":"93.195.61.209","user":"darKing","app":"mail","method":"POST","url":"/nextcloud/index.php/apps/mail/api/accounts/1/send","message":{"Exception":"Exception","Message":"Return value of OCA\\ContactsInteraction\\Db\\CardSearchDao::findExisting() must be of the type string or null, resource returned","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":137,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Mail\\Controller\\AccountsController"},"send"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Mail\\Controller\\AccountsController","send",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"accountId":"1","_route":"mail.accounts.send"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"accountId":"1","_route":"mail.accounts.send"}]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"accountId":"1","_route":"mail.accounts.send"}]},{"file":"/var/www/nextcloud/lib/base.php","line":1012,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/mail/api/accounts/1/send"]},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":110,"Previous":{"Exception":"TypeError","Message":"Return value of OCA\\ContactsInteraction\\Db\\CardSearchDao::findExisting() must be of the type string or null, resource returned","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php","line":120,"function":"findExisting","class":"OCA\\ContactsInteraction\\Db\\CardSearchDao","type":"->","args":[{"__class__":"OC\\User\\User"},null,"segadarking@gmail.com",null]},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":76,"function":"handle","class":"OCA\\ContactsInteraction\\Listeners\\ContactInteractionListener","type":"->","args":[{"__class__":"OCP\\Contacts\\Events\\ContactInteractedWithEvent"}]},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[{"__class__":"OCP\\Contacts\\Events\\ContactInteractedWithEvent"},"OCP\\Contacts\\Events\\ContactInteractedWithEvent",{"__class__":"Symfony\\Component\\EventDispatcher\\EventDispatcher"}]},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[{"__class__":"Closure"}],"OCP\\Contacts\\Events\\ContactInteractedWithEvent",{"__class__":"OCP\\Contacts\\Events\\ContactInteractedWithEvent"}]},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":86,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[{"__class__":"OCP\\Contacts\\Events\\ContactInteractedWithEvent"},"OCP\\Contacts\\Events\\ContactInteractedWithEvent"]},{"file":"/var/www/nextcloud/apps/mail/lib/Listener/InteractionListener.php","line":84,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCP\\Contacts\\Events\\ContactInteractedWithEvent",{"__class__":"OCP\\Contacts\\Events\\ContactInteractedWithEvent"}]},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":76,"function":"handle","class":"OCA\\Mail\\Listener\\InteractionListener","type":"->","args":[{"__class__":"OCA\\Mail\\Events\\MessageSentEvent"}]},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[{"__class__":"OCA\\Mail\\Events\\MessageSentEvent"},"OCA\\Mail\\Events\\MessageSentEvent",{"__class__":"Symfony\\Component\\EventDispatcher\\EventDispatcher"}]},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[{"__class__":"Closure"},{"__class__":"Closure"},{"__class__":"Closure"},{"__class__":"Closure"},{"__class__":"Closure"}],"OCA\\Mail\\Events\\MessageSentEvent",{"__class__":"OCA\\Mail\\Events\\MessageSentEvent"}]},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":86,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[{"__class__":"OCA\\Mail\\Events\\MessageSentEvent"},"OCA\\Mail\\Events\\MessageSentEvent"]},{"file":"/var/www/nextcloud/apps/mail/lib/Service/MailTransmission.php","line":181,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCA\\Mail\\Events\\MessageSentEvent",{"__class__":"OCA\\Mail\\Events\\MessageSentEvent"}]},{"file":"/var/www/nextcloud/apps/mail/lib/Controller/AccountsController.php","line":345,"function":"sendMessage","class":"OCA\\Mail\\Service\\MailTransmission","type":"->","args":[{"__class__":"OCA\\Mail\\Model\\NewMessageData"},null,null,117]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"send","class":"OCA\\Mail\\Controller\\AccountsController","type":"->","args":[1,"test asdfd ","ast es afd","\"Steven Google (segadarking@gmail.com)\" <segadarking@gmail.com>","","",false,117,null,null,[],null]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Mail\\Controller\\AccountsController"},"send"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":137,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Mail\\Controller\\AccountsController"},"send"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Mail\\Controller\\AccountsController","send",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"accountId":"1","_route":"mail.accounts.send"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"accountId":"1","_route":"mail.accounts.send"}]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"accountId":"1","_route":"mail.accounts.send"}]},{"file":"/var/www/nextcloud/lib/base.php","line":1012,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/mail/api/accounts/1/send"]},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/apps/contactsinteraction/lib/Db/CardSearchDao.php","Line":89},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","version":"19.0.3.1","id":"5f6e7a211024a"}

Bingo. See Return value of OCA\\ContactsInteraction\\Db\\CardSearchDao::findExisting() must be of the type string or null, resource returned · Issue #21696 · nextcloud/server · GitHub

So how do I fix this? I cannot send EMails…

It was fixed and backported.

This topic was automatically closed after 7 days. New replies are no longer allowed.