<a href="email-link">email-link</a>
const copyLink = (e) => {
e.preventDefault();
let aux = document.createElement('input');
let url = e.target.getAttribute('href');
aux.setAttribute('value', url);
document.body.appendChild(aux);
aux.select();
document.execCommand('copy');
document.body.removeChild(aux);
};
let link = document.querySelector('a');
link.addEventListener('click', copyLink);