Maybe this is really simple for many, but I still see people without an email link on their individual posts. The reason for it is if a reader finds the post very useful, then they can easily email it to a friend, helping increase the readership of your blog.

For WordPress…

<?
$emailTitle =urlencode(the_title('','',FALSE));
$emailTitle = str_replace('+', ' ', $emailTitle);
?>
<a href="mailto:?subject=<? echo $emailTitle;
?>&body=Check this out!%0A%0A<?php the_permalink()
?>">Email this Post</a>

For Movable Type (if your static pages are PHP)…

<?
$emailTitle =urlencode('<$MTEntryTitle encode_php="q"$>');
$emailTitle = str_replace('+', ' ', $emailTitle);
?>
<a href="mailto:?subject=<? echo $emailTitle;
?>&body=Check this out!%0A%0A<$MTEntryPermalink$>"
>Email this Post</a>

If your MT static pages are not PHP, then I doubt it will work for you.

If you want to use a little envelope graphic, there’s a tons of icons at http://famfamfam.com/. Grab the “Silk” package, and make sure you give him a link back. You’d want to format the image part like this…

<img src="envelope.png" title="Email this Post">

The title tag is needed so the text will appear when the image is mousedover.

Comments are closed.

About me

I've been developing web sites for over 12 years. I started with HTML, moved on to Perl and now do mostly PHP with a lot of MySQL and Javascript as well.

The purpose of this blog is to write about many of the simpler scripting solutions bloggers are either unaware of or unable to implement. Hopefully I'll have something you can use

Danny Carlton

Advertising
Advertising

Switch to our mobile site