Publishing Blog Posts To WordPress Via Email

WordPress allows you to publish new posts using an email address.

To enable this function, you’ll need to:

  • Setup a secret pop3 email address on your web server (normally in cPanel)
  • Enter your mail server address in your Writing Settings
  • Enter your secret email address username in the Login Name field
  • Enter your secret email address password in the Password field
  • Activate WordPress to publish your e-mail posts to your blog

Post Via Email

  • Go to Settings > Writing and scroll down to the sub heading Post via e-mail

Writing Settings - Post Via Email

WordPress suggests 3 random strings you can use to create a secret email address.

Example: adgI9BrB@yourdomain.com

If you’re email host doesn’t allow you to use numbers in your email accounts, create a new email address which is hard to guess.

Any mail received at this address will be posted, so it’s a good idea to keep this address very secret.

Mail Server Settings

This setting will generally be the same as what you use to configure your email address using an email client like MS Outlook.

Example: pop.yourdomain.com

Login Name

Enter the login name for your secret email address.

Example: adgI9BrB@yourdomain.com

Password

Create a password which is also more than 10 digits long which consists of lower and uppercase letters, numbers and symbols.

This password should be created when you are creating the secret email address you’ll be using for publishing via email.

Example: w+7thUpr?6@p

Default Mail Category

Simply create a new category for remotely publishing blog posts via email or select an existing category from the drop down menu.

Activate WordPress to Accept Email Posts

There’s various methods you can use to enable WordPress to accept posts via email.

  • Set up a Cron Job ( WP-Cron Control Plugin does the job)
  • Insert iFrame code to the footer of your website pages
  • Add a php function to your child themes functions.php file using the wp-mail function

If you want to use iframe code in your footer or a cron job, you’ll need to follow the instructions on the WordPress Codex.

Always backup your files and have access to FTP before adding php code.

The easiest method is to add this code to your child themes functions.php file.

add_action('shutdown', 'retrieve_post_via_mail');
function retrieve_post_via_mail() {
	flush(); 
	if(get_transient('retrieve_post_via_mail')) { 
		return; 
	} else { 
		$mail = wp_remote_get(get_bloginfo('wpurl').'/wp-mail.php');
		if(!is_wp_error($mail)) { 
			set_transient('retrieve_post_via_mail', 1, 60 * 15); 
		} else {
			set_transient('retrieve_post_via_mail', 1, 60 * 5); 
		}
	}
}

Using Free Email Accounts

You can use a Gmail, Yahoo or any other free email account to publish posts to your blog via email.

You’ll need to follow the above instructions and find your email server like you would do if creating a secret email address on your own web server.

Other Ways to Post Remotely

Did you know you can also create new blog posts using MS Word and Windows Live Writer and publish them to your WordPress blog remotely?

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.