Fix: send mailto unsubscribe ourselves instead of via the OS handler

The List-Unsubscribe action for mailto: links created a hidden anchor,
clicked it and reported success. That hands the mailto: URL to the OS
default mail handler - for a webmail user that opens the wrong program
or nothing at all, and the unsubscribe message is never sent, while the
banner still claims it was.

The confirm flow now parses the mailto: URL (address, subject, body -
percent-decoded manually since RFC 6068 does not use plus-encoding) and
sends the message through the account's own JMAP client, preferring the
identity that received the newsletter so the list can match the
subscriber. In unified views the send is routed to the email's owning
account. Success is only reported once the server accepted the message.

The mobile confirm dialog reused the success strings as its question
text; it gets proper confirm_message strings in all 22 locales, and
success_mailto now says what actually happened.
This commit is contained in:
dealerweb
2026-07-08 15:41:46 +02:00
committed by Linus Rath
parent 22418c17cf
commit 94af4725b6
26 changed files with 185 additions and 31 deletions
+3 -1
View File
@@ -436,7 +436,9 @@
"confirm_button": "Potwierdź",
"cancel": "Anuluj",
"success_http": "Strona wypisania otwarta w nowej karcie",
"success_mailto": "Żądanie wypisania wysłane do klienta poczty",
"success_mailto": "Wysłano e-mail rezygnacji z subskrypcji",
"confirm_message_http": "Strona rezygnacji z subskrypcji otworzy się w nowej karcie.",
"confirm_message_mailto": "Do nadawcy zostanie wysłany e-mail rezygnacji z subskrypcji.",
"error": "Nie można się wypisać",
"dismiss": "Zamknij"
},