mail
mail copied to clipboard
Error saving draft: Message cannot be sent
Steps to reproduce
- Click on Forward when you receive an email with an attachment.
- Write a message and add recipient addresses.
- Change the sender address to a different email account.
Notes:
- I don't know if it's necessary to have attachments, but it was in my case.
- Steps 2 and 3 can also be reversed, with the same result.
Expected behavior
Forward emails with a different sender address that has also been set up as a mailbox.
Actual behavior
- The message βError saving draftβ (de: "Fehler beim Speichern des Entwurfs") appears at the bottom left.
- The message can no longer be sent. Nothing happens when you click on the βSendβ button.
Mail app version
5.3.1
Nextcloud version
31.0.5
Mailserver or service
No response
Operating system
No response
PHP engine version
PHP 8.3
Nextcloud memory caching
No response
Web server
Apache (supported)
Database
MariaDB
Additional info
- No error messages or warnings appeared in the logs.
I've seen this JavaScript messages:
[ERROR] mail: Could not save draft
Object { app: "mail", uid: "example", level: 2, error: {β¦} }
app: "mail"
error: Object { message: "Request failed with status code 404", name: "AxiosError", code: "ERR_BAD_REQUEST", β¦ }
level: 2
uid: "example"
<prototype>: Object { β¦ }
index.mjs:54:16
[ERROR] mail: could not send message
Object { app: "mail", uid: "example", level: 2, error: {β¦} }
β
app: "mail"
error: Object { message: "Request failed with status code 404", name: "AxiosError", code: "ERR_BAD_REQUEST", β¦ }
code: "ERR_BAD_REQUEST"
config: Object { timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", β¦ }
message: "Request failed with status code 404"
name: "AxiosError"
request: XMLHttpRequest { readyState: 4, timeout: 0, withCredentials: false, β¦ }
response: Object { data: {β¦}, status: 404, statusText: "", β¦ }
ββ
stack: "je@https://example.com/apps/mail/js/mail.js?v=d635cf65-137:2:1072151\nf@https://example.com/apps/mail/js/mail.js?v=d635cf65-137:2:1076435\n"
ββ
status: 404
<prototype>: Object { constructor: J(e, t, n, a, r), toJSON: toJSON(), stack: "", β¦ }
level: 2
uid: "example"
β
<prototype>: Object { β¦ }
index.mjs:54:16
log index.mjs:54
error index.mjs:72
default NewMessageModal.vue:476
a match.js:15
onSend NewMessageModal.vue:465
[WARN] mail: could not send message
Object { app: "mail", uid: "example", level: 2, error: {β¦} }
β
app: "mail"
error: Object { message: "Request failed with status code 404", name: "AxiosError", code: "ERR_BAD_REQUEST", β¦ }
level: 2
uid: "example"
β
<prototype>: Object { β¦ }
index.mjs:51:16
Thanks for your bug report π
https://github.com/nextcloud/mail/blob/7114399e7d72c55c8e0fe927ac628e1d1c6ea4a8/lib/Service/Attachment/AttachmentService.php#L296-L300
The client object we are passing is for the sender account, because we want to store the draft there. If the source message is within another account, then we cannot use that client object to fetch the attachment.