Title: &#8220;Send 2 friend&#8221; function
Last modified: August 18, 2016

---

# “Send 2 friend” function

 *  [tcloer](https://wordpress.org/support/users/tcloer/)
 * (@tcloer)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/send-2-friend-function/)
 * Hi,
 * for a while i have been looking for a simple way to add a “send 2 friend” functionality
   to my posts.
 * I saw one that i liked at a friend’s blog (which is implemented in Movable Type,
   though: [http://vowe.net](http://vowe.net)).
 * After looking at the page source i thought i could do that myself and just hacked
   the index.php in my theme dir with this code for the loop (in the `<p class="
   postmetadata">` section):
 * `<a title="Mail this to someone else" href="mailto:?subject=<?php bloginfo('name');?
   >: <?php the_title(); ?>&amp;body=You might consider reading this: <?php the_permalink()?
   >">Send 2 friend</a> <strong>|</strong>`
 * As you can see, this basically just adds a mailto: link which calls the blog 
   and post title for the subject line and adds a little body – everything else 
   is left to the default mail client on the system. I think that’s no bad idea 
   at all. You can see it action on my site [http://www.teezeh.info](http://www.teezeh.info)
 * Since i am all but a PHP or WP wizard, i just wonderes whether this could be 
   done as a plug-in as well? After some browsing through he Codex i found that 
   i neither have the time nor the skills to do this. Maybe someone else wants to
   try?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [freshpolitics](https://wordpress.org/support/users/freshpolitics/)
 * (@freshpolitics)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/send-2-friend-function/#post-172166)
 * It doesn’t look like that code would work if implimented, although I am myself
   looking to emulate your idea.
 * I would like to find a plugin (one that works in 1.5) that has this same function,
   but uses a popup making it unnecessary to have configured email program.
 * Any suggestions?
 *  Thread Starter [tcloer](https://wordpress.org/support/users/tcloer/)
 * (@tcloer)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/send-2-friend-function/#post-172168)
 * So far i am not able to paste the code here correctly – the backtick thing does
   not work. Still trying – and you can see it working on my site…
 * _Update:_ Code should be legible now…
 *  [davidchait](https://wordpress.org/support/users/davidchait/)
 * (@davidchait)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/send-2-friend-function/#post-172367)
 * I’ll be making my mail-a-link form available at some point, once I get through
   with all my other plugins. Haven’t decided whether/how I will make it a plugin—
   at the moment it’s more hard-coded to work. Also, it uses secondary scripts, 
   but I could probably make it use the php mail function, or see if WP has standardized
   on mail-message code finally… 😉
 * -d
 *  [lawtai](https://wordpress.org/support/users/lawtai/)
 * (@lawtai)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/send-2-friend-function/#post-172375)
 * what would be cool would be to also have a check as to see how many times the
   link was clicked on to send an e-mail, or a way to figure out who’s sending the
   e-mails.
 *  [davidchait](https://wordpress.org/support/users/davidchait/)
 * (@davidchait)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/send-2-friend-function/#post-172751)
 * My mail-a-link thing does that — it keeps a database table for each link-email
   sent out… I just need time to get through other stuff to clean it up nice for
   other folks to use! 😉
 * -d
 *  [freshpolitics](https://wordpress.org/support/users/freshpolitics/)
 * (@freshpolitics)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/send-2-friend-function/#post-172900)
 * I’m a nice folk! And clean!
 *  [dickrichards](https://wordpress.org/support/users/dickrichards/)
 * (@dickrichards)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/send-2-friend-function/#post-172917)
 * tcloer – worked perfectly. So simple and elegant. Thanks. Where would I add it
   to have it show up on archives pages.
 *  [dickrichards](https://wordpress.org/support/users/dickrichards/)
 * (@dickrichards)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/send-2-friend-function/#post-172925)
 * Never mind. Figured it out.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘“Send 2 friend” function’ is closed to new replies.

 * 8 replies
 * 5 participants
 * Last reply from: [dickrichards](https://wordpress.org/support/users/dickrichards/)
 * Last activity: [21 years, 1 month ago](https://wordpress.org/support/topic/send-2-friend-function/#post-172925)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
