How to publish posts to WordPress blog via Email

September 22nd, 2008

I am actually writing this post in my Gmail account. Here is what you
need to do when you want to publish a post to your Wordpress blog by
sending email messages:

  • Enter the Mail section on your C-Panel.
  • Create a very secret email address, the one that nobody could guess. If other people know this email address, they can post to your blog with no restrictions.
  • In your WordPress Settings, go to Writing Settings, and find Post via e-mail section. Input the your secret mail address and password, and choose a default category of your emailed posts.
  • Send an email to your secret address.
  • Edit your wp-mail.php under the WordPress installation directory, find this line, and change the line below it into ‘publish’:
// Author not found in DB, set status to pending. Author already set to admin.
$post_status = 'publish';
  • In your browser, visit your wp-mail.php so that your emailed posts will be published. This is the url I feed to my browser: http://www.thinkweird.info/wp-mail.php

Your emailed posts should appear in your front page now.

Limitations:

  • I am not sure how to tag this post, neither do I know how to insert pictures into this email message which is going to be posted.
  • You can’t use Rich formatting to format your posts, just use plain text. As common HTML tags will be stripped.
  • Only good for a very plain, words only post.

Advantages:

  • Good for travelers with limited computer availability.
  • Very efficient. It is like writing an email message to your readers, and you may even be inspired when posting in this unorthodox method.

Tip:

To automatically publish emailed posts, and avoid visiting wp-mail.php every time after you send a post, add the following line to the bottom of footer.php of your theme. Remember to use your own URL instead of mine.

<iframe src="http://thinkweird.info/wp-mail.php" name="mailiframe" width="0" height="0" frameborder="0" scrolling="no" title=""></iframe>

Related Posts:

4 Responses to “How to publish posts to WordPress blog via Email”

  1. David says:

    Thanks for that great post…I searched for hours and read WordPress Forums, but you were the most help!!!! Thanks.

  2. Hello,

    i am trying for this but.. i failed to do this. i have created a secret email under gmail.com and it is configured. but it is not working. what to do? please let me know…
    thanks in advance

    anoop.

    • thinkweird says:

      Did you modify the file wp-mail.php? Please double check the steps and perhaps run through them again?

  3. [...] P.S.2: 关于怎么样设置用wordpress自动收邮件博文,参考一个比较不错的帖子: http://www.thinkweird.info/573/how-to-publish-posts-to-wordpress-blog-via-email-4 [...]

RSS feed for comments on this post. And trackBack URL.

Leave a Reply