Reputation: 131
Whenever I try to add a simple mailto link, all devices except iOS work fine.
Based on Apple iPhone Documentation it should work as such:
<a href="mailto:frank@wwdcdemo.example.com">John Frank</a>
But I made a new post on a WordPress site that contains the URL exactly as such and when tapping it on iPhone (iPhone 7 simulator and real iPhone 6) it just gives an error:
Upvotes: 13
Views: 18207
Reputation: 1446
Use a real device, not the simulator. Mail and phone apps are not installed on the simulator, so you can't use them.
From Mail Links in the Apple URL Scheme Reference:
iOS Note: If the Mail app is not installed, clicking a mailto URL displays an appropriate warning message to the user.
Upvotes: 19
Reputation: 1965
You can adding onclick event and get it done:-
<a href="#" onclick="window.location='frank@wwdcdemo.example.com'; return false;" class="noHighlight">John Frank</a>
Hope it helps!
Upvotes: -5