How to stop google chrome opening mailto in mail

By default, Google Chrome opens the mailto protocol in the default email client on your system. If you want to stop Chrome from opening mailto links and instead use a different email client or service, you can follow these steps:

Method 1: Disable Chrome's default behavior

  1. Type chrome://settings/ in the address bar and press Enter.
  2. Scroll down to the "Advanced" section.
  3. Click on "System" and then toggle off the switch next to "Open links from other apps and protocols in the associated app".
  4. Click "Relaunch" to apply the changes.

Method 2: Use a Chrome extension

There are several Chrome extensions available that can help you stop Chrome from opening mailto links. Here are a few options:

  1. Mailto Handler: This extension allows you to choose which email client or service to use when clicking on a mailto link.
  2. No Mailto: This extension simply prevents Chrome from opening mailto links.
  3. Protocol Handler: This extension allows you to customize the behavior of various protocols, including mailto.

To install a Chrome extension, follow these steps:

  1. Go to the Chrome Web Store and search for the extension you want to install.
  2. Click the "Add to Chrome" button.
  3. Click "Add extension" in the pop-up dialog.
  4. The extension will be added to your Chrome browser.

Method 3: Use a user script

If you're comfortable with JavaScript, you can use a user script to modify the behavior of mailto links in Chrome. Here's an example script you can use:

  1. Create a new file with a .js extension (e.g., mailto_handler.js).
  2. Add the following code to the file:
    
    function handleMailto(event) {
    event.preventDefault();
    // Replace with your preferred email client or service
    window.location.href = 'https://example.com/email-client';
    }

document.addEventListener('DOMContentLoaded', function() { const mailtoLinks = document.querySelectorAll('a[href^="mailto:"]'); mailtoLinks.forEach(function(link) { link.addEventListener('click', handleMailto); }); });


3. Load the script in Chrome by going to `chrome://extensions/`, enabling developer mode, and clicking "Load unpacked".
4. Select the folder containing your script file and click "Add".
5. The script will run whenever you click on a `mailto` link in Chrome.

Remember to replace the `https://example.com/email-client` URL with the URL of your preferred email client or service.