We had earlier written a post on How To Add a Print This Button To Your Blog. Now here’s how you can add an Email This button to your WordPress Blog.

When the Email This button is clicked,  the below Javascript code opens the default email application and creates a subject and a link that points to the blog post the reader is currently visiting. On clicking this, the reader can add the email address of the person to whom he/she wishes to send the post and have it sent.

<script type=”text/javascript”>
<!– Code begins
function isPPC() {
if (navigator.appVersion.indexOf(“PPC”) != -1) return true;
else return false;
}
if(isPPC()) {
document.write(‘<a class=”contact” HREF=\”mailto:\?subject\=Check out at this page I found, ‘ + document.title + ‘?body=You can see this page at: ‘ + window.location + ‘\” onMouseOver=”window.status=\’Send your friends an e-mail about this page\’; return true” TITLE=”Send your friends an e-mail about this page”>Email to a Friend<\/a>’);
}
else { document.write(’<a class=”contact” HREF=\”mailto:\?body\=Take a look at this page I found titled ‘ + document.title + ‘. Check out this page at: ‘ + window.location + ‘\” onMouseOver=”window.status=\’Send your friends an e-mail about this page\’; return true” TITLE=”Send your friends an e-mail about this page” rel=”nofollow”>Email This!<\/a>’);
}
// End –>
</script>

Do let me know if you face any problems in implementing this and I’ll gladly help you with it :)

Photo Credit: Rodolfo Clix

If you like this post, then do consider subscribing to our blog. Thanks!

Related Posts with Thumbnails

Popularity: 2% [?]

You Should Also Check Out These Posts: