# Open special Gmail & Outlook links to compose a new message

**URL:** https://discourse.mozilla.org/t/open-special-gmail-outlook-links-to-compose-a-new-message/144039
**Category:** Firefox for Android Add-ons
**Tags:** issue
**Created:** [June 9, 2025, 10:36pm UTC](https://discourse.mozilla.org/t/open-special-gmail-outlook-links-to-compose-a-new-message/144039 "2025-06-09T22:36:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![JNavas](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/jnavas/32/73601_2.png) [@JNavas](https://discourse.mozilla.org/u/JNavas)
#### Post date: [June 9, 2025, 10:36pm UTC](https://discourse.mozilla.org/t/open-special-gmail-outlook-links-to-compose-a-new-message/144039/1 "2025-06-09T22:36:40Z")

</div>

My new extension **[Page Mail](https://addons.mozilla.org/en-US/firefox/addon/page-mail/)** supports mailto:, Gmail and Outlook on desktop, opening a compose window pre-filled with Subject and Body using **browser.tabs.create()**, but in enhancing it for Android, I can only get mailto: to work that way by using **window.open()** (with annoying Allow/Deny confirmation). With **Gmail** or **Outlook** I get the **Inbox**.

Has anyone figured out a way to open a compose window with special Gmail and/or Outlook links in an Android extension? Thanks!

```auto
// Compose URL templates
const MAILTO_TEMPLATE = "mailto:?subject={SUBJECT}&body={BODY}";
const GMAIL_TEMPLATE = "https://mail.google.com/mail/?view=cm&fs=1&su={SUBJECT}&body={BODY}";
const OUTLOOK_TEMPLATE = "https://outlook.live.com/mail/0/deeplink/compose?subject={SUBJECT}&body={BODY}";

```

---

<div class="post-metadata">

### Author: ![dotproto](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/dotproto/32/62957_2.png) [@dotproto](https://discourse.mozilla.org/u/dotproto)
#### Post date: [June 10, 2025, 12:00am UTC](https://discourse.mozilla.org/t/open-special-gmail-outlook-links-to-compose-a-new-message/144039/2 "2025-06-10T00:00:02Z")

</div>

Just to make sure I follow, you’re trying to open the compose view for Gmail/Outlook as web page in Firefox for Android, right?

If so, I’m seeing this too. I tested by opening the Gmail template URL on desktop using Firefox’s [Responsive Design](https://firefox-source-docs.mozilla.org/devtools-user/responsive_design_mode/) mode to emulate a Samsung phone. I haven’t looked into Outlook.

It seems like Gmail is doing user agent detection and serving a different experience to mobile users. Adding the hash `#co` (e.g. `https://mail.google.com/mail/#co`) will open the compose view, but as far as I can tell there’s no way to provide a default subject, recipient, or body.

---

<div class="post-metadata">

### Author: ![JNavas](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/jnavas/32/73601_2.png) [@JNavas](https://discourse.mozilla.org/u/JNavas)
#### Post date: [June 10, 2025, 12:23am UTC](https://discourse.mozilla.org/t/open-special-gmail-outlook-links-to-compose-a-new-message/144039/3 "2025-06-10T00:23:33Z")

</div>

@dotproto  
Perplexity agrees with you ([link](https://www.perplexity.ai/search/why-does-window-open-in-a-fire-i29QcaeTQra_tfqhptabRA)), and suggests there is “No Reliable Web-Only Solution” other than using mailto (which is what I do now).  
I was just hoping that someone had found a work-around that Perplexity hasn’t found.
