Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mailto link not working within a frame chrome (over https)

I have a mailto link on a page. It works as expected when the page is loaded by itself.

However when the page is loaded via a frameset in Chrome nothing happens. With the developer tools loaded the error "[blocked] The page at https://mysite.com ran insecure content from mailto:..." is displayed.

How can I fix/workaround this?

like image 303
Dale K Avatar asked Oct 07 '13 21:10

Dale K


People also ask

Why is mailto not working in Chrome?

Log in to your email account (it's a required step to edit settings). Choose “Mail” from the menu and then “Preferences”. Change the default client in the first dropdown list. If you want Chrome and Gmail to open mailto links for you by default, make sure Google Chrome is picked as the default client on either OS.

How do I change my mailto in Chrome?

Google ChromeClick Show Advanced Settings at the bottom of the page. Under "Privacy," click Content Settings. Scroll down to the "Handlers" section, and click the Manage Handlers button. Select your desired, default email client (e.g. Gmail).


2 Answers

Yes, using "top" is the trick, but you can do it with HTML alone!

<a target="_top" href="mailto:...">email</a> 
like image 91
kendsnyder Avatar answered Sep 19 '22 17:09

kendsnyder


I also had this issue recently with an iframe. Using the top frame worked and should be compatible with all major browsers.

window.top.location = 'mailto:...'; 
like image 33
Jason Hardies Avatar answered Sep 17 '22 17:09

Jason Hardies