Google Chrome mailto Status canceled
Asked Answered
W

3

11

I have a very simple hyperlink in my MVC App.

<a href="mailto:&subject=somesubject" class="anchoroffset nounderline shareusingemail" title="Share using Email"><div class="sprite icon-email-gray "></div></a>

Now when I click on this link in Google Chrome (v36.0.1985.125) I always notice Status cancelled under Network tab. However it does open my Outlook with the right subject. To troubleshoot this problem I disabled all the Chrome extensions too but it had no impact on the issue.

Network tab showing request is cancelled

This is not a deal breaker but I am surely curious to know why this is happening and can I prevent it? I have also tested same link in IE (v11), FF (v30.0) and Safari (v5.1.7) and I didn't notice any issue there.

I have already gone thru Javascript location.href to mailto triggers a GET HTTP that gets canceled in Chrome question but it didn't help me.

Any insight into this error is much appreciated. Thanks.

Watchtower answered 30/7, 2014 at 14:51 Comment(4)
I think is just related to your local configuration. Maybe a status code returned by Outlook or something else or simply because the request has beend forwarded to another app, outlook in your case. Not sure if you'll got the exact reason...Cense
I have the same issue. Have you been able to find any information on this?Ceric
Unfortunately no, I don't have any information.Watchtower
Can confirm this also happens on a PC with Lotus Notes installed as the default mail client.Maddux
S
7

This behavior is trigerred by Chrome registering itself for mailto URLs as a default program.

The cancelled message in the Network window is normal and only indicates that Chrome won't open a new browser window, but it will still launch your email software.

Under Windows 10 (and probably previous versions) you can set the default program. First select 'default program by protocol' via the Start Menu, then locate the following entry into the list :

URL:MailTo Protocol

and change it to your email software.

As a Webmaster it's still problematic, because you won't be able to control this behavior on the computer of the people visting your web page. I'll recommend to use a contact form with a server side script instead of a mailto link.

Selena answered 6/2, 2016 at 11:54 Comment(0)
S
1

This happens when Windows has Chrome registered as your default mail handler, but when you haven't click the allow option in the diamonds on the right of the URL bar in Gmail to tell Chrome to allow Gmail to handle your emails.

Here is the solution if you're the end-user:

  1. Go to Gmail
  2. In the URL bar of the same tab, right side you’ll find a rhombus icon encircled in this image: https://qph.fs.quoracdn.net/main-qimg-f89b950229a8ddc54a41b8beddefed87.webp.
  3. Click on it. Make it allow.
  4. You’re ready to use mailto in Chromium (web browser) / Chrome.

However, the developer solution is indeed to add a form.

Sldney answered 20/6, 2018 at 2:9 Comment(0)
A
0

What worked for me as a fix in my case was using "_blank" attribute on a tag.

Ate answered 10/10, 2023 at 10:15 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.