I have a script that works great for generating links for my social media buttons.
What I’m having trouble with is generating a link for a mailto button. I’d like to include the Blog Post Title in the email subject field and the URL of the blog post in the Body of the email.
My script is below.
<script>
$( document ).ready(function() {
var Url = window.location.href;
var fbLink = "https://www.facebook.com/sharer/sharer.php?u=" + Url;
var twhash = "hashtags=DataLiteracy";
var twlink = "https://twitter.com/intent/tweet?text=Check Out This Article: " + Url + "&" + twhash;
var lilink = "https://www.linkedin.com/sharing/share-offsite/?url=" + Url;
var m2link = "mailto:?subject=";
document.getElementById('fbQuote').href = fbLink;
document.getElementById('tweetQuote').href = twlink;
document.getElementById('linkedin').href = lilink;
document.getElementById('mailto').href = m2link;
});
</script>