Mailto links do nothing in Chrome but work in Firefox?

后端 未结 17 563
伪装坚强ぢ
伪装坚强ぢ 2020-12-02 08:13

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

相关标签:
17条回答
  • 2020-12-02 08:33

    I just had the same issue. Creating a function solved the problem:

    <script>
        function sendEmail(){        
            window.location = "mailto:test@test.com";
        }
    </script>
    
    <a onclick="sendEmail();">hi this is a test</a>
    
    0 讨论(0)
  • 2020-12-02 08:37

    On macOS check also the Mail.app settings, which App is selected as default email App / associated with mailto: links:

    If you ever clicked that notification on Gmail, which allows to open links in Gmail instead your App - and after this reset the Chrome handler, you have to edit this manually in your Mail.app Settings.

    0 讨论(0)
  • 2020-12-02 08:38

    'Use Chrome, invite troubles' - Anonymous. (Just a symbolic reference)

    Well, Chrome is notoriously famous for a lot of default security-enabled utilities, and that's where your problem originates from.

    This can, however, be undone by 'setting the default email client' (as the default email client is unset), or by setting up the default handler under 'chrome://settings/handlers' (by default, it's set to 'Ignore').

    0 讨论(0)
  • 2020-12-02 08:39

    Another solution is to implement your own custom popup/form/user control that will be universally interpreted across all browsers.

    Granted this will not leverage the "mailto" out of the box capabilities. It all depends on what availability adherence you are working against. Unfortunately for myself - the mailto needed to be available to everyone by default without "inconveniencing the client".

    Your decision ultimately.

    0 讨论(0)
  • 2020-12-02 08:40

    I had the same problem. The problem, by some strange reason Chrome turned himself as the default tool to open a mailto: link. The solution, put your mail client as the default app to open it. How to : http://windows.microsoft.com/en-nz/windows/change-default-programs#1TC=windows-7

    Good luck

    0 讨论(0)
  • 2020-12-02 08:41

    This is browser settings specific, i.e. it will behave differently depending on the user's browser settings. The user can change how mailto: links behave in chrome by visiting chrome://settings/handlers, or Chrome Settings->Content Settings->Manage Handlers...

    If "email" is not listed on that page, then see this answer regarding how to proceed.

    0 讨论(0)
提交回复
热议问题