Why is My Mailto Attachment Not Supported?
Troubleshooting parameters like ?attachment= when they fail to attach files in Gmail, Outlook, or Apple Mail.
Symptom Checklist
If you wrote a mailto link using parameters like attachment=, attach=, or file=, you probably observed one of the following:
- The compose window opens, but no file is attached: Modern webmail apps (Gmail web) and desktop apps (Apple Mail) completely discard unknown parameters.
- The link does not open at all: Some email client associations break when encountering unrecognized query keys, causing the browser or mail utility to fail silently.
- Works for you but fails for your users: Legacy desktop client installations in local office intranet setups might process local system paths, but they will fail for normal web visitors on mobile or modern operating systems.
Three Main Reasons It Fails
1. Web Browser Sandboxing
Browsers run websites in a secure, sandboxed environment. A website is never allowed to search, read, or attach files from your local disk (e.g., C:/documents/file.pdf) without direct user action via an upload element.
2. Protocol Security Standards
If the mailto protocol could automatically attach files, malicious web pages could trigger links that silently upload sensitive files (like passwords, keys, or private documents) and send them to attackers without user consent.
3. Lack of Official Standard
RFC 6068 (the specification detailing the mailto scheme) does not define file attachment parameters, and unrecognized fields cannot be relied upon.
How to Resolve This Issue
To successfully deliver files to your users, migrate to a working alternative such as hosted storage sharing or interactive forms with file selectors.
Explore Working Solutions