Mail To Friend – Gmail Compose Email link – Safe Recommend

by Hiroshi on September 26, 2008

in Forms, Security

Do not use forms in websites or blogs unless you know these are safe from vulnerability. But it is always useful to have a Recommend This Page To a Friend link so that your visitors can refer your pages to their friend. Here is a way to provide your visitors facility to email your posts or pages to their friends in a safe way:

Blog Mail To Via Gmail, Link Structure

This script will take URL of post and title of post and bring you to Gmail compose page putting there title as subject and URL in body.

<a href="https://mail.google.com/mail/?fs=1&view=cm&shva=1&su=<?php the_title(); ?>&body=<?php the_permalink(); ?>" target="_blank">Email To A Friend</a>

Website Mail To Via Gmail, Link Structure

https://mail.google.com/mail/?fs=1&view=cm&shva=1&su=Your page title here&body=mail body if any here

Related Posts

Previous post:

Next post: