Thomas
Thomas

Reputation: 130

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:[email protected]" method="post">
    <Button type="submit" class="button">Contact Me Now</Button>
</form>

How can I fix this?

Upvotes: 1

Views: 691

Answers (1)

Thomas
Thomas

Reputation: 130

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

<div class="button">
   <a href="mailto:[email protected]">Contact Me Now</a>
</div>

Upvotes: 1

Related Questions