Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open default mail client with a link

I have an HTML link on my ASP.NET page. When the user clicks the link, an Outlook window will open. However, it changes the URL on my page also to mailto:[email protected].

How to stop it?

<a href="#" 
   onclick="window.open('mailto:[email protected]?Subject=upport','','200','200');"
   style="color: White">Contact Support</a>
like image 448
Goutham Avatar asked Jan 20 '23 12:01

Goutham


2 Answers

Don't do it in a window.open. Just show the link on the page, as a normal link, and Outlook will open in a new window anyway, because it's a different program.

like image 154
David Avatar answered Jan 23 '23 01:01

David


How about this?

<a href="mailto:[email protected]?Subject=upport" style="color: White">Contact Support</a>
like image 39
Hawxby Avatar answered Jan 23 '23 00:01

Hawxby