Postie uses standard WordPress “filter hooks” during the processing of each email to give you a chance to do some special processing.


Filter hook name Version first available Notes
postie_filter_email 1.5 This filter is called after the "from" email address has been extracted from the email so that you have a chance to change who is the author.
postie_post_before 1.5.14  This filter is called just before Postie saves the post. Replaces postie_post.
postie_post_after 1.5.14  This filter is called just after Postie saves the post.
postie_post 1.4 This filter is called just before Postie saves the post. Deprecated in favor of postie_post_before as of 1.5.14.

Getting started

First we need to glue Postie and your custom code together.

Create a file named filterPostie.php in the wp-content directory and place the following code into it. Postie will automatically recognize this file so you don’t have to do anything else.

function my_postie_post_function($post) {
    return $post;

add_filter('postie_post_before', 'my_postie_post_function');


This is the minimum code you need to write. In this case my_postie_post_function() dosen’t do anything. See the examples below for more specifics.


Integrating with Polylang