Post By Email Proposal: v2

This is the updated version of the proposal, which incorporates feedback and suggestions from the project’s mentors and the WordPress community.

Background

There’s already a ticket in Trac with a patch to deprecate the core Post By Email functionality. We’ll build a standalone plugin that can serve as a drop-in replacement, allowing us to move forward with removing this functionality from core and adding more features for those who do use it. An overview of the way the core functionality currently works is outlined in the Codex.

Tasks

  1. Convert wp-mail.php over to the Plugin API.
    • Plugin install: look for old settings and copy them over into the plugin’s options (get them out of the core database settings).
    • Create plugin settings page that shows an activity/error log.
  2. Update refresh methods
    • Automatic refresh with wp-cron (preferred) — will still work.
    • Automatic refresh hooked to the ‘shutdown’ action, with configurable refresh time — will still work. NOTE: this still requires a hit to the blog to run.
    • Remove the old methods from the Codex (loading up wp-mail.php automatically or in an iframe).
    • Replace these with a manual “refresh” button on the plugin settings.
  3. Extend the current deprecation patch
    • Include instructions (or maybe auto-install?) for the new plugin (not sure what the protocol is for this, I presume we want to handle it the same way as Links)
    • wp-mail.php should just call the action hook.
    • Vet existing plugins (search plugin repo) to ensure backward compatibility.
    • wp-mail.php should run a check for has_action on the hook to see if there’s anything hooked into it and raise a “doing it wrong” warning if not. (This will check for servers that are calling wp-mail.php directly.)
  4. Submit for community feedback and testing! Squish bugs.
  5. Extend functionality (Order and priority TBD)
    • Support formatting from HTML emails (bold, italic, links, etc.).
    • Support any mail server (Gmail, Yahoo), so you don’t have to set up your own mail server. (This might already be okay, need to review.  We might just need better instructions in the Codex with examples of the settings.)
    • Support attachments (will be added to the media library for that post and embedded — shortcodes could also be used to specify gallery layouts a la Jetpack).
    • Support IMAP access (right now only POP) and SSL.
    • Add support for tags/categories/custom taxonomies via shortcode.
    • Streamline publishing, maybe with an admin panel to vet unpublished posts (not sure how this works in the current version, should review).
    • Whitelist sender emails — looks like the current behavior does vet the sending address against authorized users, so maybe there is nothing to do here, but we should review and see if it needs improvement.
    • Implement PIN-based authentication or something similar (email addresses are easy to guess/spoof).
    • Support comment reply via email (i.e., filter outgoing mail through the wp-mail function and override the reply-to header).
  6. Finally, edit/update the Codex page to reflect the new state of the art.

Timeline

  • June 17 – July 17: Convert existing code to plugin, deprecate core
  • July 18 – July 25: Feedback/testing/bug fixes
  • July 26 – Sept 15: Add new features
  • Sept 16 – Sept 23: Final round of review & bug fixes

We may not have enough time to implement all the new functionality, so we’ll prioritize the new features accordingly when we reach that stage of the project.

9 comments

    1. Hi Gabriel! Thanks for pointing this out — I’d definitely like to get it to work with multisite. Do you happen to know what the issue is with that right now? Is it just that the settings are global?

      1. Hi Kat,

        Thanks for your reply.

        Unfortunately I was hoping that you could have known the issue and not the other way around ;-)

        Currently I am overloaded, but if I manage to have some free time next month (and you still don’t know what is the issue), I’ll surely will investigate it.

        Right now I would agree with you, looks like the issue is with settings being global.

        Regards,
        Gabriel

    1. Hi, thanks!

      For custom post types, do you mean that you’d like to be able to specify the post type (instead of having it automatically be a regular Post)? Kind of the same way it allows you to specify a default category now?

      I think we could support that, though it may be out of scope for the summer. Similar to categories, it feels like the sort of thing it would be good to have a shortcode for.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s