Title: Custom e-mail link
Last modified: August 19, 2016

---

# Custom e-mail link

 *  [macheesmo](https://wordpress.org/support/users/macheesmo/)
 * (@macheesmo)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/custom-e-mail-link/)
 * I’m trying to get a custom email link to work on all of my posts. Basically I
   just want text that shows on each post that links to an email.
 * This is the code I included which displays correctly:
    `<a href="mailto:?subject
   =<?php rawurlencode (the_title()); ?>&body=<?php rawurlencode (the_permalink());?
   >">Email This Post</a>`
 * The only problem I have is that if there happens to be an apostrophe in the title
   it doesn’t work.
 * What’s displays as “Whatâ€™s”
 * I’m also worried that maybe other characters are going to be messed up. What’s
   weird is that if I use a plugin like Sociable, then it displays correctly so 
   clearly there is a right way to do it. I just want text instead of graphic.
 * Any help on what I’m missing?

The topic ‘Custom e-mail link’ is closed to new replies.

## Tags

 * [special-characters](https://wordpress.org/support/topic-tag/special-characters/)

 * 0 replies
 * 1 participant
 * Last reply from: [macheesmo](https://wordpress.org/support/users/macheesmo/)
 * Last activity: [17 years, 7 months ago](https://wordpress.org/support/topic/custom-e-mail-link/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
