diff --git a/src/components/MenuEnvelope.vue b/src/components/MenuEnvelope.vue
index 0f1fe735ce..5f989e5903 100644
--- a/src/components/MenuEnvelope.vue
+++ b/src/components/MenuEnvelope.vue
@@ -1,5 +1,5 @@
@@ -29,6 +29,21 @@
{{ t('mail', 'Forward') }}
+
+
+
+
+
+ {{ copied ? t('mail', 'Link copied') : t('mail', 'Copy direct link') }}
+
$/g, '')
+ const url = window.location.origin + generateUrl('/apps/mail/open/' + encodeURIComponent(trimmedMessageId))
+
+ try {
+ await navigator.clipboard.writeText(url)
+ this.copied = true
+ showSuccess(t('mail', 'Direct link copied to clipboard'))
+ } catch (error) {
+ // Fallback for cases where clipboard API is not available (e.g. non-HTTPS localhost)
+ // or permission is denied. This exactly matches Nextcloud's useCopy composable behavior.
+ window.prompt(t('mail', 'Copy direct link'), url)
+ } finally {
+ this.copyResetTimer = setTimeout(() => {
+ this.copied = false
+ this.localMoreActionsOpen = false
+ }, 2000)
+ }
+ },
+
isSieveEnabled() {
return this.account.sieveEnabled
},