Gmail “Compose” Links Changed: What Broke and How to Fix Your hrefs
If your Gmail links started opening the inbox instead of a pre‑filled compose window, you’re not imagining it. Google’s routing for compose URLs shifted. Here are the reliable formats to use now—with copy‑paste examples.
Executive summary
- Legacy links like
https://mail.google.com/mail/u/0/?view=cm&tf=1&to=…can redirect to the inbox, especially with multiple signed‑in Google accounts. - Use
tf=cmwith standard fields (to,cc,bcc,su,body). Optionally target a specific account via/u/<index-or-email>/. - For website hand‑off from
mailto:to Gmail, register Gmail as a protocol handler and/or use the?extsrc=mailto&url=mailto:…pattern.
Symptoms
- Clicking a compose link lands you in the inbox, not the compose modal.
- Works in one profile but fails in another; fails more often with multi‑account sessions.
- On mobile web, Gmail may ignore prefill and still show the inbox.
What changed
Gmail’s internal router no longer guarantees the old ?view=cm&tf=1 behavior. The newer pattern ?tf=cm is more consistent. Mobile web remains less predictable; consider native mailto: as a fallback.
Recommended, working patterns (2025)
1) Direct compose (desktop Gmail)
Use tf=cm and, if needed, address a specific account.
https://mail.google.com/mail/u/0/?to=info@bedrijf.nl
&su=New+offer
&body=Corine%20%2B31%20317%20615689
&cc=
&bcc=
&tf=cm
/u/0/= first signed‑in account; use/u/1/for second, or/u/your.address@gmail.com/.- Supported fields:
to,cc,bcc,su(subject),body.
2) “mailto → Gmail” handoff (robust on websites)
Register Gmail as the handler, then regular mailto: links will open Gmail Compose with prefill.
navigator.registerProtocolHandler(
"mailto",
"https://mail.google.com/mail/?extsrc=mailto&url=%s",
"Gmail"
);
Example button:
<a href="mailto:info@bedrijf.nl?subject=New%20offer&body=Corine%20%2B31%20317%20615689">
Email us
</a>
How to migrate old links
| Old pattern | Issue | Replace with |
|---|---|---|
?view=cm&tf=1 |
May redirect to inbox; unstable with multiple accounts. | ?tf=cm&to=…&su=…&body=… (optionally add /u/0/ or /u/email/) |
Raw mailto: without handler |
Falls back to OS client (Outlook/Apple Mail). | Register Gmail as handler and/or use ?extsrc=mailto&url=mailto:… |
| Desktop pattern reused on mobile | Mobile web may ignore prefill and show inbox. | No guaranteed fix; consider native mailto: fallback. |
Copy‑paste: your exact case
Direct (desktop Gmail, first account)
https://mail.google.com/mail/u/0/?to=info@bedrijf.nl&su=New+offer&body=Corine%20%2B31%20317%20615689&tf=cm
Direct (explicit account by email)
https://mail.google.com/mail/u/your.address@gmail.com/?to=info@bedrijf.nl&su=New+offer&body=Corine%20%2B31%20317%20615689&tf=cm
Website button using mailto → Gmail
<a href="mailto:info@bedrijf.nl?subject=New%20offer&body=Corine%20%2B31%20317%20615689">Contact</a>
Tip: Always URL‑encode spaces (
%20) and plus signs (%2B) in su/body to avoid mangled text.Note: Google does not publish a stable, official spec for these query parameters; behavior can change. Patterns above are verified as of Oct 2025.

Comments
Post a Comment