mail icon indicating copy to clipboard operation
mail copied to clipboard

"From" field no longer set to currently selected account when composing

Open te-online opened this issue 4 years ago • 2 comments

Expected behavior

After I change to a secondary account by clicking on the label for it or any mailbox below it, I click "New message" in the left sidebar. The "From" field in the new message dialog is pre-set to the email address of the account I'm currently browsing.

I'm pretty sure this used to be the actual behavior :-)

Actual behavior

The "From" field is always set to the first account's email address.

Mail app

Mail app version: 1.9.5

Mailserver or service: not relevant to issue, happens for different services

Server configuration

Operating system: Nextcloud Docker, Ubuntu host

Web server: Nginx

Database: MySql

PHP version: 7.4.16

Nextcloud Version: 20.0.9

Client configuration

Browser: Chrome 90

Operating system: Debian, macOS

te-online avatar May 20 '21 20:05 te-online

:eye: @kesselb could be related to the alias signatures feature

ChristophWurst avatar May 26 '21 14:05 ChristophWurst

https://github.com/nextcloud/mail/blob/8f72ac860dc1d0eef9fa06c0f25459e4865ce627/src/components/Composer.vue#L550-L554

Good catch. It seems the logic to "predefine" another alias is already there.

https://github.com/nextcloud/mail/blob/8f72ac860dc1d0eef9fa06c0f25459e4865ce627/src/components/NewMessageDetail.vue#L140-L144

But the way to obtain the current accountId is broken. It seems that the acocuntId is not available as url parameter. The mailbox id should be available via route.

Something like const mailbox = this.$store.getters.getMailbox(this.$route.params.mailboxId) to fetch the mailbox object should work. Then set accountId to mailbox.accountId.

kesselb avatar May 26 '21 15:05 kesselb