Search code examples
htmliossafarimailto

Using mailto on the html, how can I open the email app from Safari in iOS?


I have a simple form with a button to open an email window. On my laptop, using Chrome, everything works fine. But on my iPhone, it doesn't open the email app.

This is the HTML

<form action="mailto:myemail@hotmail.com" method="post">
    <Button type="submit" class="button">Contact Me Now</Button>
</form>

How can I fix this?


Solution

  • To fix this, I removed the form and used an anchor tag instead.

    <div class="button">
       <a href="mailto:email@hotmail.com">Contact Me Now</a>
    </div>