If you want it to load the mail client on a click rather than every time the page refreshes, you want it attached to a click event, something like this :
<button class="button">Open Email</button>
Using jQuery :
$(document).ready(function(){
$('.button').on('click',function(){
window.location.href = "mailto:[email protected]?subject=Subject&body=message%20goes%20here";
});
});
Update
If you want it to load multiple instances of the client, just duplicate the window.location.href
:
$(document).ready(function(){
$('.button').on('click',function(){
window.location.href = "mailto:[email protected]?subject=Subject&body=message%20goes%20here";
window.location.href = "mailto:[email protected]?subject=Subject2&body=message%20goes%20here";
});
});