Filter: postie_include_attachment

This filter is called before Postie saves the attachment to media library. Typically you would use this filter if you wanted to prevent Postie from processing certain files. I.e. all non-image files or you could exclude all executable files or use your own whitelist or exclude all files.
Parameters:
  • $attachment – an array of information about the attachment
    • filename – the name of the file as specified in the email.
    • mimetype – the mimetype of the file.
    • data – the content of the file.
add_filter('postie_include_attachment', 'my_postie_include_attachment', 10, 2);

function my_postie_include_attachment($include, $attachment) {
    return false; //don't include any attachments
}

 

1.9.11 Released

  • Fix: remove encoding option, everything is UTF-8.
  • Feature: add MySQL version to debug output, suppress many email parsing debug messages
  • Fix: don’t set actual post format if “standard”
  • Feature: Hides WordPress post-by-email feature if Postie is active

1.9.5 Released

  • Feature: change post status to pending/draft if the user doesn’t have publish_posts capability
  • Fix: process postie_email_notify_recipients filter regardless of the “Send post confirmation email to” setting
  • Fix: process postie_email_reject_recipients filter regardless of the “Send post confirmation email to” setting

Newsletter Fixer AddOn

I’ve had many requests over the years to find a way to “clean up” posts that come from newsletters etc that have a lot of CSS styling that isn’t compatible with WordPress.

After many false starts I’ve finally released an AddOn that does just that.