ThisCalculator

Everyday

How to Publish WordPress Posts by Email

Updated · Standard formula, shown below

Publishing WordPress posts by email lets you write and send a post from any email client, and WordPress automatically creates a draft or published post from it. This is handy when you’re away from your dashboard, on a mobile device, or collaborating with writers who prefer email. Before you start, you’ll need a self-hosted WordPress.org site (this feature isn’t available on WordPress.com free plans) and access to your site’s admin area.

What You’ll Need

  • A self-hosted WordPress.org website (where you can install plugins and access wp-admin).
  • Admin access to the WordPress dashboard.
  • An email account that can send and receive emails (any address, e.g., Gmail, Outlook, or your domain email).
  • A secret email address that you’ll create for publishing (this is not your personal email).
  • Optional: a plugin to enhance the default email-posting feature (e.g., for attachments or better formatting).

Step-by-Step

  1. Log in to your WordPress admin dashboard. Go to wp-admin (e.g., yourdomain.com/wp-admin) and enter your credentials.
  2. Navigate to Settings → Writing. In the left sidebar, click “Settings” and then “Writing.” This page contains the “Post via email” section.
  3. Create a secret email address. You need a dedicated email address that only you (or trusted authors) will use for posting. It can be on any email service, but it must be one you can check. For example, wp-posts@yourdomain.com or myblogposts@gmail.com. Avoid using your main personal email to prevent accidental posts.
  4. Set up the mail server settings. In the “Post via email” section, you’ll see fields for:
    • Mail Server: Enter the incoming mail server (POP3) for that email address. For Gmail, it’s pop.gmail.com; for Outlook, outlook.office365.com; for most cPanel hosting, it’s mail.yourdomain.com. Your email provider’s help page will tell you the exact server.
    • Port: Usually 110 for POP3 (non-SSL) or 995 for POP3 with SSL. If your server requires SSL, you’ll need to enable it (see step 6).
    • Login Name: The full email address (e.g., wp-posts@yourdomain.com).
    • Password: The password for that email account.
  5. Set the default category. Choose a category that new posts will be assigned to if you don’t specify one in the email subject. It’s fine to leave it as “Uncategorized” and change it later.
  6. Enable SSL if required. Most modern email providers require SSL. To use it, you’ll need to add a small code snippet to your wp-config.php file or use a plugin. The simplest method is to install a plugin like “Post via Email” or “WP Mail SMTP” that handles SSL. Alternatively, add this to wp-config.php:
    define('WP_MAIL_SERVER', 'pop.gmail.com');
    define('WP_MAIL_PORT', 995);
    define('WP_MAIL_SSL', true);

    (Note: This is a simplified example; you may need to adjust based on your server.)

  7. Save your settings. Scroll down and click “Save Changes.” WordPress will test the connection and show a success or error message.
  8. Test the setup. Send a test email to your secret address with a subject line and body. For example, subject: “Test Post” and body: “This is a test.” WordPress will fetch it and create a draft post (by default, it’s set to “draft” unless you change the status in the email).
  9. Check the draft. Go to Posts → All Posts. You should see your test post as a draft. Open it to verify the content and formatting.
  10. Publish by email (optional). By default, posts are created as drafts. To publish directly, you can include a special line in the email body: Status: publish (on its own line). Or you can change the default in the settings by editing the code, but it’s safer to keep drafts and publish manually.

Common Mistakes

  • Using a personal email address: If you use your main email, anyone who emails you could accidentally trigger a post, or you might get spam that becomes drafts.
  • Wrong mail server or port: Entering an IMAP server instead of POP3, or using the wrong port, will cause connection failures. Check your email provider’s documentation.
  • Forgetting SSL: Many providers (like Gmail) require SSL. If you don’t enable it, WordPress won’t connect.
  • Not checking the “Post via email” section: Some hosts disable this feature. If you don’t see the section, your hosting may not support it, or you need to enable it via a plugin.
  • Sending HTML emails: WordPress strips most HTML tags from emails. If you need rich formatting, use a plugin or send plain text.

Tips

  • Use a dedicated email address that you check regularly, and set up a filter to delete spam before WordPress fetches it.
  • Set up a cron job to check for emails more frequently. By default, WordPress checks when someone visits your site. If you want faster publishing, use a plugin like “WP Crontrol” or configure a real cron job.
  • Use the subject line as the post title. The email subject becomes the post title, and the body becomes the content. Keep it clear.
  • Include metadata in the body using lines like Category: News or Tags: tech, how-to to assign categories and tags automatically.
  • Test with a draft first. Always send a test email and verify the draft before relying on it for live posts.
  • Consider a plugin like “Postie” or “WP Email Post” for advanced features: image attachments, custom post types, and better formatting.

Troubleshooting

  • Connection error when saving settings: Double-check the mail server and port. Try using pop.gmail.com with port 995 and SSL enabled. If your host blocks outbound connections, contact your hosting provider.
  • No posts appear after sending email: Check that the email was actually delivered to the inbox (not spam). Also, WordPress only checks for emails when someone visits a page. Visit your site to trigger the check, or set up a cron job.
  • Email is fetched but content is empty or garbled: If you sent an HTML email, WordPress may have stripped tags. Send plain text instead. Also, avoid using special characters that might confuse the parser.
  • Posts are created as drafts instead of published: This is the default behavior. To publish automatically, include Status: publish in the body, or modify the code (not recommended for beginners).
  • SSL certificate errors: If your email provider uses a self-signed certificate, you may need to add a filter to disable SSL verification (not recommended for security). Better to use a provider with a valid certificate.

Frequently Asked Questions

Can I use this on WordPress.com?

No, the “Post via email” feature is only available on self-hosted WordPress.org sites. WordPress.com offers a similar feature only on paid plans, but it works differently.

Will images in my email be included in the post?

By default, WordPress does not attach images from emails. You’ll need a plugin like Postie to handle image attachments and embed them.

Can I schedule a post by email?

Yes, you can include a line like Schedule: 2025-01-01 10:00 in the email body (with a plugin) or use the default “draft” and schedule it manually.

Is it secure? Can anyone post to my blog?

Security depends on keeping your secret email address private. If someone discovers it, they could send emails that become posts. Use a strong password and consider two-factor authentication on that email account.

Why isn’t my email being fetched automatically?

WordPress only checks for emails when someone visits your site. If you have low traffic, posts may appear delayed. Set up a real cron job (e.g., using your hosting control panel) to run wp-cron.php every few minutes.

Can I use this to post to multiple WordPress sites?

Yes, you can set up the same email address on multiple sites, but each site will fetch the same email, creating duplicate posts. Better to use separate email addresses per site.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.