WordPress – Send Post To A Friend

In WordPress send post to a friend feature is very useful for your readers. I used this feature first time on Indian Recipes blog and it has been a major hit. On daily basis there are about anywhere between 500-700 visitors sending posts by e-mail to their friends.

Send To Friend Feature On FreeIndianRecipes.com
Send To Friend Feature On FreeIndianRecipes.com

Before you install and use E-mail post to a friend feature, you have to decide if your blog posts are really worthy to be recommended to friends? Not all type of content will qualify for E-mail to friend feature. Even I don’t use this feature on my own blog and the reason for this is that all my blog posts are technical in nature. It is very unlikely that someone will send these posts by e-mail to their friends.

The recipe blogs are probably the most like-able to be recommended to a friend. If you have a blog with news or some nice story it can also qualify for recommend a friend feature.

Here is step by step guide on how to install, enable and use Send Post To A Friend feature in WordPress.

I’ll do a demo by installing and configuring this plugin on Homemade Recipes blog.

Step 1 – WP-Email plugin

Well basically it is all about installing a plugin and configuring it. You will need WP-E-mail plugin by Lester Chan. Install this plugin, enable it and then go straight to configure.

Step 2 – Configure Wp-Email plugin

This will need a bit of work to suit your style and could be tricky too. To configure Wp-Email plugin go to E-mail->E-mail options which you can find towards the bottom in left admin menu.

On the configuration page you will find all the settings. I would recommend following settings which works very well for me. If you wish you can change the settings to suit your requirements.

WordPress WP-Email Settings
WordPress WP-Email Settings

In E-mail Styles leave the SMTP options untouched.

In E-mail Icon I select 3rd option

E-Mail Link Type – select E-mail Popup

This is important. You don’t want these to be pages and get indexed by search engines, do you?

E-Mail Text Link Style – Select E-mail icon only. You don’t want to show text as well. This is bad for SEO as it will add extra and irrelevant text on each of posts/page.

In E-Mail Settings you can select the option which you want to show, I normally select all fields.

E-Mail Content Type – Select HTML

Method Used To Send E-Mail: Leave it default to PHP

You can leave the rest of fields to be default and if you need you can always come back and tweak them to suit your needs.

Step 3 – Add code to theme

You need to add code to show the E-mail icon in posts/pages.

Following is the code which you need to add in theme file.

[sourcecode]<?php if(function_exists(‘wp_email’)) { email_link(); } ?>[/sourcecode]

I add this code just below the title and right side of category in the top on the single post. To do so edit your theme’s single.php or index.php (if single.php file is not present) and add above code to the right side of category. See snap below:

Add code in single.php file
Add code in single.php file

Now check it’s working on a post.

Wordpress E-mail Post To Friend
Wordpress E-mail Post To Friend

Once you see this click on the E-mail To Friend icon and you will see a pop up window which shows error.

Step 4 – Solving Error page problem

to solve the error showing instead of E-mail form in pop up window you have to go to Settings->Permalinks and just click on Save Changes.

Go back to any post, refresh (CTRL+F5) the page and click on e-mail icon.
Now you should be able to see the e-mail form.

Send E-mail Form
Send E-mail Form

You can change the E-mail subject etc from the settings as you wish.

This is not the end. This plugin also offers you statistics of the e-mail along with all details – sender’s e-mail id, receiver’s e-mail id, subject etc. You can check it in E-mail-> Manage E-mail menu.

This is a great plugin by Lester Chan who is just a student from Signapore, don’t forget to donate him if you like this plugin.


Comments

9 responses to “WordPress – Send Post To A Friend”

  1. Charles Avatar
    Charles

    Is there any alternative to this plugin?

    I’m looking for a simple send to friend wordpress plugin with less settings.

  2. This plugin is broken if you try to use it on a Custom Post Type with non-default permalinks structure.
    The issue is about 3 months and still has no solution. If someone has a solution, please paste it on the WordPress forum –
    http://wordpress.org/support/topic/plugin-wp-email-plugin-not-working-with-custom-post-type

    There are many users that are looking forward for a fix to this bug.
    Thanks

    1. Maor,
      I haven’t tried custom post type, but if the URL is problem then what about using php function to get URL directly and then using this URL.
      This will avoid default permalinks structure.

      1. Maor Barazany Avatar
        Maor Barazany

        The url of the send email will be, for example, domain.com/post-permalink-slug/email.
        This plugin does some rewrite rules in order to get this url working. This direct link is working on posts and pages, but produces 404 error if the slug is of a Custom Post Type.
        You can see in the link to the thread in WP forum, that some ideas came up there, but finally till now nothing has solved the issue, unfortunately.

        1. Maor,
          Try Settings->Permalinks
          Do nothing but just click on Save, see if it works.

          I remember that it always gives this problem when you set it up first time and use url option in Wp Email settings.

          I don’t use the permalink structure, I always use popup window feature. Try this

          WP E-mail -> E-mail Options -> E-Mail Link Type
          Select E-mail Pop up instead of Standalone page option.

          This might not be related with your problem but just in case…

          I see that you have already got Lester Chan involved in it so he will be the best person to fix it.

          Unfortunately I’ve become php dumb now a days ;) and don’t try to mess up with php code, or may be getting older, already 10% of hairs white ;)

          I’ve know WordPress geeks who might be able to fix this issue but they need some reward for this type of work.

          1. Maor Barazany Avatar
            Maor Barazany

            I have already tried more than once to flush permalink rules, as you could read in the WP forum thread, but with no luck – it is still not working.

            I tried also with the popup option, but it is not working with that too (btw: I use the standalone page, just to pop it in a nice colorbox window, which is better than popup, anyway – neither browsing to the standalone page, nor using the popup version – are not working, with custom post type and non default permalinks)

            I hoped that Lester Chan will solve this, but it appears he is very busy in the last months, as he wrote in the thread, so he had no time till now to fix this issue.

            I don’t mind to reward someone that will fix this issue. If you know someone, you can give my mail for that.

            Thanks

            1. I guessed so that you might have tried these options already.

              I’ll check with WP geek, as you know all geeks are always busy. Let me see if I can get hold of him to do this work. I’ll update you by e-mail if I get any reply from him.

  3. Maor Barazany Avatar
    Maor Barazany

    Thanks Ajay.

  4. Maor Barazany Avatar
    Maor Barazany

    Well, I have finally found a solution on my own after having bit of time to dig the plugin’s source code (I am also a php and WP developer).

    You can find it in the WP forums thread – http://wordpress.org/support/topic/plugin-wp-email-plugin-not-working-with-custom-post-type

    Hope it will help someone..

    Enjoy

Leave a Reply

Your email address will not be published. Required fields are marked *