Subscribe to
Posts
Comments
NSLog(); Header Image

Email Links

The chevrons (») seen in the titles on the main and individual pages here now function as "email a friend this article" links. Click them and you'll see what I mean. Here's the very simple code. The trickiest part was the "%0D" for carriage returns.

<a href="mailto:?subject=<?=str_replace(" ", "%20", "<MTEntryTitle>");?>
&amp;body=Hi,%0D%0DI%20thought%20you%20might%20find%20this%20interesting!%0D%0D
&lt;<MTEntryPermalink>&gt;%0D%0D" title="Email <MTEntryTitle> to Someone">&raquo;</a>

A snap!

2 Responses to "Email Links"

  1. Doesn't quite work for me using Mail.app. Everything gets put into the subject line. Perhaps you need

    ...mailto:?subject=Email%20Links&body...

    instead of

    ...mailto:?subject=Email%20Links?body...

  2. Probably correct, and it now uses an & instead of a ?


Trackback URI | Comments RSS

Leave a Reply to Erik J. Barzeski

Please abide by the comment policy. Valid HTML includes: <blockquote><p>, <em>, <strong>, <ul>, <ol>, and <a href>. Please use the "Quote Me" functionality to quote comments.