Home > Software engineering >  mailto attribubte not opening mail client
mailto attribubte not opening mail client

Time:10-21

So, I'm currently studying an HTML course on udemy and there's a part in the video where the instructor creates a "mailto" attribute and when she clicks the "submit" button, it opens her mail client. I followed everything to the teeth and even checked on the mdn website but nothing opens when I click "submit" on my end.

This is a test form that I created, please check below!

<form action="mailto:[email protected]" method="post" enctype="text/plain">
        <label>Name</label>
        <input type="text" name="yourName" value="">
        <br>
        <label>Email</label>
        <input type="email" name="yourEmail" value="">
        <br>
        <label>Preferred contact date:
          <input type="date" name="yourContactDate" value="">
        </label>
        <br>
        <label>Your feedback</label><br>
        <textarea name="yourFeedback" rows="10" cols="10"></textarea><br>
        <input type="submit" name="">
        <br>
        <label>Rate your experience!</label>
        <input type="range" name="" value="" min="0" max="100">
      </form>
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>

CodePudding user response:

I tried your code and it does work on my browser.

However, after doing some research, I found that some browsers will not open mailto forms if you use post.

CodePudding user response:

your formular is flawless in my opinion.

I you dont have a very special Browser, check your default application for emails in your operating system. Make sure you use something recommended like Outlook or Firefox to handle the mail:to form.

Otherwise you should take a look over here, in that case, that it might be caused by your browser:

Mailto links do nothing in Chrome but work in Firefox?

  • Related