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.

1.9.3 Released

  • Feature: Add “every 2 hours” option
  • Fix: Include actual response when IMAP authentication fails
  • Fix: Incorrectly processing text/html sections as attachments in some cases

1.9.1 Released

  • Feature: Add postie_file_added_pre action
  • Fix: improvements to tag detection
  • Fix: tags may be specified multiple times
  • Fix: significant code restructure to bring Postie in line with current coding practices
  • Fix: move signature removal to before newline filtering
  • Fix: signature removal was deleting all text if the matching regex had whitespace characters

Action: postie_file_added_pre

This action is called after Postie successfully extracts anĀ email attachment and before it adds it as a media item to the post. At the point it is called there is only a placeholder post, e.g. the content and metadata is not set yet.

add_action('postie_file_added_pre', 'my_fileaddedpre', 10, 2);

function my_fileaddedpre($postid, $file_array) {
    error_log("file name: {$file_array['name']}");
    error_log("file type: {$file_array['type']}");
    error_log("file path: {$file_array['tmp_name']}");
    error_log("file size: {$file_array['size']}");
}

1.8.45 Released

  • Feature: If image placement directive has a caption, update the image metadata to include the caption.
  • Fix: Only process delay tag if date was found in header
  • Fix: Date tag overrides header and no offsets are applied
  • Fix: Check for term slug as well as name

1.8.44 Released

  • Ensure only users from current site are validated.
  • Process newlines earlier in process.
  • WordPress 4.8 compatibility testing.

1.8.42 Released

  • Wrap all attachments in div with css class “postie-attachments”
  • Remove APOP authentication attempt as some servers disconnect on failure.