Href="mailto:" Is Not Working On Any Of The Browsers
Solution 1:
Provided you have registered a default email client, this usually works, if you're using an <a>
tag as follows:
<a href="mailto:someone@mozilla.org">Mail me</a>
To change or check the email client settings, do the following (cited from MSDN) - I have modified it slightly because it differs depending on the Windows version you're using:
Depending on the Windows version:
Open Default Programs by clicking the Windows Start button, and then clicking Default Programs.
Or: Open the Control Panel in the Start Menu , then use the search text box in the upper right corner of the Control Panel screen and typeDefault Programs
there. Hit Enter.Click Set your default programs.
Under Programs, click the Email program you'd like to use, and then click Set this program as default.
Click OK.
Note
The first time you start them, some email programs display a message asking you if you want to use that program as the default. If you choose to do so, this program will become your default email program, even if you've chosen a different program using Set your default programs earlier.
In , you can find the Control Panel, if you open the Windows menu
, then click on the cogwheel icon
, then enter
Control Panel
in the search box.
Solution 2:
- This is not really a programming question, but its been here for over 5 years, and the other answers didn't resolve my own question, which was resolved as follows.
- I came to this question because I was experiencing the same issue, with properly formatted email anchors failing to open Gmail when Chrome was set as the default email app. The other answer did not work in Windows 10, with Chrome.
- In the case of this OP, it seems that Google Chrome is already set as the Default Email app, as indicated by On Firefox, IE & Safari it opens a new blank Chrome Window when I click on the link, and the anchor is properly formatted, because clicking it in other browsers, opens a blank Chrome window.
- This is the exact description for my own experience, which brought me to this question.
The HTML anchor does not seem to be the culprit.
- To get
Send Mail
from<a href="mailto:someone@example.com " target="_top">Send Mail</a>
to work in Google Chrome in Windows 10:- Go to Settings, Apps, Default Apps, and under Email, select Google Chrome.
- In Chrome, go to Settings by selecting
- Select Privacy and security on the left side of the screen
- Select Site Settings
- Scroll down to Permissions and select Additional permissions
- Select Handlers
- Select Allow sites to ask to become default handlers for protocols
- If a site (e.g. Gmail) is blocked, remove the block
- Open Gmail in a new tab and sign in
- Return to the Settings tab, and
mail.google.com
will be the email handler.
Solution 3:
Are you sure you are closing the anchor correctly? The full HTML should be this:
<a href="mailto:someone@mozilla.org">Test</a>
Solution 4:
Try something like this:
<!DOCTYPE html>
<html>
<body>
<p>
Click to email :
<a href="mailto:someone@mozilla.org?Subject=Hello" target="_top">someone@mozilla.org</a>
</p>
</body>
</html>
Post a Comment for "Href="mailto:" Is Not Working On Any Of The Browsers"