It seems like the mailto
links we\'re embedding in our website fail to do anything in Chrome, though they work in Firefox.
Simple example here: http://j
I solved the problem using this code:
<button onclick="email()">Contact me !</button>
<script>
function email() {
var str = window.open('mailto:aaaaaa@aaaaaa.net', '_blank');
}
</script>
It worked for me like a charm !
This is because chrome handles the mailto in different way. You can go to chrome://settings/handlers
and make sure that which is the default handler. In your case it will be none (i.e. not listed). Now go to gmail.com. You should see something like this when you click on the button beside the bookmark button.
If you wish to open all email links through gmail then set "Use Gmail". Now when you click on mailto button, chrome will automatically opens in gmail.
Please check it this:
This is working in chrome and all browser.
<a href="mailto:test.test@gmail.com">Test</a>
try and working in great.
The usual <a href="mailto:hi@hi.com"></a>
should work, but remember you must have a default email program set on your computer. For ex, I'm using Ubuntu 14.04 and the default email is thunderbird, which works fine.
I also experienced this issue, and eventually tracked it down to the fact that my link was within an iframe, and my web app uses https. Chrome was blocking it due to this (Chrome would open other mailto links outside of the iframe).
In mailto link not working within a frame chrome (over https), kendsnyder mentioned simply changing
<a href="mailto:...">email</a>
to
<a target="_top" href="mailto:...">email</a>
Voila, problem solved. That mailto link now works in all browsers.