Open alabre opened 3 years ago
I think the auto detection doesn't always work. Can you confirm that in your account settings there are no drafts/sent/trash mailboxes configured even though your account has mailboxes for that?
Thank you for you quick response. :-) I missed to give you some more information. I configured the mailbox manually. I have set the empty fields for Sent/Drafts/Trash and they are still shown in the configuration. When I send a mail I get the error. The IMAP folder "INBOX.sent" is the name shown when I click on the three dots of the corresponding folder in the lefthandside folder view of the mail account in the app. The name in the folder view is "Gesendet" as I am on a German system.
Another observation is that after some tries to get the account running (and edits in the configuration) the fields for the three special folders are empty and I have to fill them in again. The password fields for IMAP and SMTP servers have to be filled in always (although they contain dots, as if filled), otherwise I get an authentication error on port 993 when saving the data from the form.
And a last one: Running php -f occ mail:account:export
So that's more information and what my experience is. I will not doubt if the cause is more than one issue and I will open more issues if you like and tell me how you want them to be sliced. :-)
Just checked same mail settings on a hosted environment with php 7.3 and mysql 10.3, Nextcloud 19.0.5 and Mail App 1.4.1
On that system I am able to sync and send E-Mails using the same settings and credentials as I use on the other server.
Yeah because Nextcloud 19 doesn't have the mailbox preference settings yet. It will always decide on the fly, which works if you are lucky but it's not very transparent for the user.
Hello I have the same issue. I am able to set up the account but when trying to send receive the "Error sending your message No sent mailbox configured. Please pick one in the account settings." When checking the account settings the Drafts, Sent and Deleted messages folders are set correctly.
Debian 9 PHP 7.3.21 mysql Ver 15.1 Distrib 10.1.47-MariaDB Nextcloud 20.0.3 Mail App 1.7.2
Please let me know if there is anything I can provide to help with troubleshooting the issue.
Please let me know if there is anything I can provide to help with troubleshooting the issue.
Yes please, I'd like to know if the stored sent mailbox preference is also in the database. Please get the account ID, then check the database table oc_mail_accounts
for the account with that ID and see if the sent_mailbox_id
is set.
Hi ChristophWurst, I have checked the database for an account created with autoconfig (the mail app has found the correct folders). The database showed IDs like 245,246,247 for the three special folders.
Sending still failed, this is the error from the log
{"reqId":"M8exSjk3nJKiwyYVcgq4","level":3,"time":"2020-12-17T20:12:49+00:00","remoteAddr":"","user":"--","app":"mail","method":"","url":"--","message":{"Exception":"OCA\Mail\Exception\ServiceException","Message":"IMAP error: Error connecting to mail server.","Code":11,"Trace":[{"file":"
After that I edited the settings manually. When loading the settings, the three special folders were shown as expected. I saved the settings and reopened them. The three special fields were empty and the values in the database were gone. After setting the three special folders manually and saving the settings, values in the database were still empty.
Looks as if there were two problems:
Cheers, alabre
I experience the same issue.
@minikN just add your :+1: to the report
For me the issue occured like this: -I visit mail tab an am prompted to set up account -I choose manual and put in servers got from my host -I get an error "Request failed with status code 404" -I visit mail tab and see the account got created anyway (-I set the IMAP and SMTP in Account settings without errors) -I try to send e-mail, I get this error, as no Drafts nor Sent folders got created
Workaround: -I create the folders called Drafts and Sent manually -I set them in the Defaults section of Account settings -The mail gets sent now
Same issue here. I have 2 observations that might/might not be relevant:
When I removed the last added user, this did not improve the situation for the original (3rd) user, error remained. As a last resort I manually added a folder(with the 3rd user) and selected that in the dropdown menu as sent box. Also no difference. This comes from the log file: `Error | Exception: Argument 1 passed to OCA\Mail\Address::fromRaw() must be of the type string, null given, called in /var/snap/nextcloud/25652/nextcloud/extra-apps/mail/lib/Service/MailTransmission.php on line 202/snap/nextcloud/25652/htdocs/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Con ... {}, "draft")/snap/nextcloud/25652/htdocs/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main("OCA\Mail\ ... r", "draft", OC\AppFramew ... {}, { action: nu ... "})/snap/nextcloud/25652/htdocs/lib/base.php - line 1008:OC\Route\Router->match("/apps/mail/ ... t")/snap/nextcloud/25652/htdocs/index.php - line 37:OC::handleRequest()Veroorzaakt doorTypeError: Argument 1 passed to OCA\Mail\Address::fromRaw() must be of the type string, null given, called in /var/snap/nextcloud/25652/nextcloud/extra-apps/mail/lib/Service/MailTransmission.php on line 202/var/snap/nextcloud/25652/nextcloud/extra-apps/mail/lib/Service/MailTransmission.php - line 202:OCA\Mail\Address::fromRaw(null, "archivaris@**.nl")/var/snap/nextcloud/25652/nextcloud/extra-apps/mail/lib/Controller/AccountsController.php - line 456:OCA\Mail\Service\MailTransmission->saveDraft(OCA\Mail\Mod ... {}, null)/snap/nextcloud/25652/htdocs/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Mail\Controller\AccountsController->draft(3, "", "", "", "", "", false, null)/snap/nextcloud/25652/htdocs/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Con ... {}, "draft")/snap/nextcloud/25652/htdocs/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Con ... {}, "draft")/snap/nextcloud/25652/htdocs/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main("OCA\Mail\ ... r", "draft", OC\AppFramew ... {}, { action: nu ... "})/snap/nextcloud/25652/htdocs/lib/base.php - line 1008:OC\Route\Router->match("/apps/mail/ ... t")/snap/nextcloud/25652/htdocs/index.php - line 37:OC::handleRequest() |
---|
`
Hope this helps.
Hi there, after some ubuntu 20.04 updates and some nextcloud updates to 20.0.7 and mail app 1.8.1 I registered my mail account by automatic detection and now I am able to send mails as expected. I have seen there was a commit regarding this issue, but I am not sure if it made it's way into the release. Thanks for all the work you do.
I have no clue which rules exist to close this issue, so I leave it to you or I would like to get a short note if I shall close it.
Cheers, Achim
I have seen there was a commit regarding this issue, but I am not sure if it made it's way into the release.
which one? FYI on github you'll see all the git tags that have the commit. that's my usual trick to tell if or what release the commit was included with.
I have seen this one https://github.com/nextcloud/mail/commit/e5186f7689177552ec516238e6652aed39754bbe but may be it's not related to my problem... I quit programming in java almost 10 years ago and never used php or so...
But it's working now on my server. Do you want me to close it or want to leave it open?
This comes from the log file:
Error | mail | Exception: Argument 1 passed to OCA\Mail\Address::fromRaw() must be of the type string, null given, called in /var/snap/nextcloud/25652/nextcloud/extra-apps/mail/lib/Service/MailTransmission.php on line 202/snap/nextcloud/25652/htdocs/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Con ... {}, "draft")/snap/nextcloud/25652/htdocs/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main("OCA\\Mail\\ ... r", "draft", OC\AppFramew ... {}, { action: nu ... "})/snap/nextcloud/25652/htdocs/lib/base.php - line 1008:OC\Route\Router->match("/apps/mail/ ... t")/snap/nextcloud/25652/htdocs/index.php - line 37:OC::handleRequest()Veroorzaakt doorTypeError: Argument 1 passed to OCA\Mail\Address::fromRaw() must be of the type string, null given, called in /var/snap/nextcloud/25652/nextcloud/extra-apps/mail/lib/Service/MailTransmission.php on line 202/var/snap/nextcloud/25652/nextcloud/extra-apps/mail/lib/Service/MailTransmission.php - line 202:OCA\Mail\Address::fromRaw(null, "archivaris@**********.nl")/var/snap/nextcloud/25652/nextcloud/extra-apps/mail/lib/Controller/AccountsController.php - line 456:OCA\Mail\Service\MailTransmission->saveDraft(OCA\Mail\Mod ... {}, null)/snap/nextcloud/25652/htdocs/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Mail\Controller\AccountsController->draft(3, "", "", "", "", "", false, null)/snap/nextcloud/25652/htdocs/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Con ... {}, "draft")/snap/nextcloud/25652/htdocs/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Con ... {}, "draft")/snap/nextcloud/25652/htdocs/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main("OCA\\Mail\\ ... r", "draft", OC\AppFramew ... {}, { action: nu ... "})/snap/nextcloud/25652/htdocs/lib/base.php - line 1008:OC\Route\Router->match("/apps/mail/ ... t")/snap/nextcloud/25652/htdocs/index.php - line 37:OC::handleRequest() -- | -- | --
@water-man If that could help, I had this error and solved it : https://github.com/nextcloud/mail/issues/4386
I had this error and solved it by manually entering the information into the database.
@meatgreet Do you recall the exact commands you used to get this done? I'm encountering the same issue :confused:
@meatgreet Do you recall the exact commands you used to get this done? I'm encountering the same issue confused
I didn't use the command line. I used the phpmyadmin tool in my site's control's panel. It's a tool to edit mysql databases using an graphical interface. So log into your webhost and click on phpmyadmin.
It just happened to one of our user just now.
The folders do have traditional folders:
Sent
We configured the mailbox manually.
I think for me the main trouble is that the error message sent to the user was not explicit, just showing a 400 that the message can't be sent.
But then, yeah, once looking at the server log and seeing: Saving draft failed: No drafts mailbox configured
we managed to fix the issue. We had to make a visio together to be able to debug that.
And now the issue is fixed on our side.
As a first iteration, making it more obvious to the user what the problem is, would already really help. Maybe even add the selection of this folders in the mailbox creation wizard, or in the param, marking them as required fields in the form.
My 2 cents :)
Couldn't mail app just automatically create the Sent, Draft, Trash folders if no folders are configured and they do not exist in the IMAP account? This is how any other IMAP client would react.
EDIT: Found that in our case, configuring Dovecot accordingly will create the folders and they will be used by NextCloud mail. We configured the file /etc/dovecot/conf.d/15-mailboxes.conf like this:
namespace inbox {
mailbox "Drafts" { special_use = \Drafts auto = create }
mailbox "Ham" { auto = subscribe }
mailbox "Junk" { special_use = \Junk }
mailbox "Sent" { special_use = \Sent auto = subscribe }
mailbox "Sent Messages" { special_use = \Sent }
mailbox "Spam" { special_use = \Junk auto = subscribe }
mailbox "Trash" { special_use = \Trash auto = subscribe }
mailbox "Draft" { special_use = \Drafts auto = subscribe }
}
Which does the trick.
We have the following error 257 times in the last 2 weeks in our company log:
{"reqId":"…","level":3,"time":"2022-03-22T07:56:35+00:00","remoteAddr":"…","user":"…","app":"mail","method":"POST","url":"/apps/mail/api/accounts/299/draft","message":"Saving draft failed: No drafts mailbox configured","userAgent":"…","version":"23.0.3.2"}
I'm encountering this issue when logging into an account on Gandi - mailboxes exist in the (Gandi) WebUI, but are not detected by Nextcloud.
Label dropped because it was a duplicate of the attribute at https://github.com/orgs/nextcloud/projects/61. The priority does not change.
The level of logging is completely insufficient. Even with maximum detail turned on, I didn't see anything to help me understand that the problem with unsent emails is due to missing or unconfigured mail folders. Only when I saw the response to the POST /apps/mail/api/outbox/21 HTTP/2.0" 400
did I find useful information.
What we can do (just brainstorming)
1) Disable sending if we know there is no sent mailbox configured -> send user to account settings or create/assign a mailbox for them 2) Create special mailboxes at account setup, if the account doesn't have them.
Let's do the following
Before a message is sent, you check if the selected account has a sent mailbox configured. If not, see if there is a mailbox with the name account.personalNamespace + t('mail', 'Sent')
or account.personalNamespace + 'Sent'
. If so, update the account to set that as sent mailbox.
If no existing mailbox looks like a sent mailbox we create one with the name account.personalNamespace + t('mail', 'Sent')
and assign it as sent mailbox.
Then we continue sending.
Hey there, I am having the same issue sadly on NC 28.01 with Mail 3.5.1 sometimes
ClientException No drafts mailbox configured Could not move draft to IMAP
The errors of course are accumulating in the log.
Expected behavior
Tell us what should happen After filling in the complete form to create a new mail account and saving without errors and syncing the inbox from the new account succussfully, I expect the app to send E-Mails without an error, assuming the remote IMAP server is available. The sent mail should occur in the sent folder.
Actual behavior
Tell us what happens instead Sending a message results in a 400 error response with the information: {"status":"fail","data":{"message":"No sent mailbox configured","type":"OCA\Mail\Exception\SentMailboxNotSetException"}} (to be seen in the developer tools of chromium in the network section). The mail is not sent and not stored in the configured folder (INBOX.sent)
Sidenote: while writing a 400 error occurrs when the app tries to save the draft (No drafts mailbox configured...).
Mail app
Mail app version: (see apps admin page, e.g. 0.5.3) 1.7.0
Mailserver or service: (e.g. Outlook, Yahoo, Gmail, Exchange,...) Remote hosted webserver (by onyxhosting) with postfix
Server configuration
Operating system: (e.g. Debian 8) Ubuntu 20.04 LTS
Web server: (e.g. Apache, Nginx,...) Nginx 1.7
Database: (e.g. MariaDB, SQLite or PostgreSQL) PostgreSQL 12.5
PHP version: (e.g. 7.0) 7.4
Nextcloud Version: (see admin page, e.g. 13.0.2) 20.0.2
Client configuration
Browser: (e.g. Firefox 48) Chromium 87.0
Operating system: (e.g. Arch Linux) Arch Linux