document.addEventListener("DOMContentLoaded", function () {
var shareMailBtn = document.getElementById('shareMail');
if (!shareMailBtn) return;
shareMailBtn.addEventListener('click', function (e) {
e.preventDefault();
const subject = encodeURIComponent(document.title);
const body = encodeURIComponent(
`Hi,
I came across this article on OnPath Testing and thought it would be worth sharing with you.
${window.location.href}
Hope you find it useful.
Best regards,`
);
window.location.href = `mailto:?subject=${subject}&body=${body}`;
});
});