Filter: postie_email_notify_body

This filter is called before a success notification email is sent and can be used to modify the message body.

Parameters:
  • $body – a string that is the email body. The email is sent as text/plain so HTML is not supported.
  • $postemail – an array that represents the parsed email. See filter: postie_post_pre for more details.
  • $postid – the id of the post that has been created.
add_filter('postie_email_notify_body', 'my_postie_email_notify_body', 10, 3);

function my_postie_email_notify_body($body, $postemail, $postid) {
 return $body . "\nDieser Beitrag wurde abgelehnt";
}

Filter: postie_email_reject_body

This filter is called before a reject notification email is sent and can be used to modify the message body.

At the point the filter is called there is no post created.
Parameters:
  • $body – a string that is the email body. The email is sent as text/plain so HTML is not supported.
  • $postemail – an array that represents the parsed email. See filter: postie_post_pre for more details.
add_filter('postie_email_reject_body', 'my_postie_email_reject_body', 10, 2);

function my_postie_email_reject_body($body, $postemail) {
 return $body . "\nDieser Beitrag wurde abgelehnt";
}

Filter: postie_email_notify_subject

This filter is called before a success notification email is sent and can be used to modify the subject line.

Parameters:
  • $subject – a string that is the email subject.
  • $postemail – an array that represents the parsed email. See filter: postie_post_pre for more details.
  • $postid – the id of the post that has been created.
add_filter('postie_email_notify_subject', 'my_postie_email_notify_subject', 10, 3);

function my_postie_email_notify_subject($subject, $postemail, $postid) {
 return $subject . ' / Dieser Beitrag wurde geschrieben';
}

Filter: postie_email_reject_subject

This filter is called before a reject notification email is sent and can be used to modify the subject line.

At the point the filter is called there is no post created.
Parameters:
  • $subject – a string that is the email subject.
  • $postemail – an array that represents the parsed email. See filter: postie_post_pre for more details.
add_filter('postie_email_reject_subject', 'my_postie_email_reject_subject', 10, 2);

function my_postie_email_reject_subject($subject, $postemail) {
 return $subject . ' / Dieser Beitrag wurde abgelehnt';
}

Filter: postie_email_notify_recipients

This filter is called before a success notification email is sent and can be used to modify the recipient list.

Parameters:
  • $recipients – an array of email address that the email will be delivered to.
  • $postemail – an array that represents the parsed email. See filter: postie_post_pre for more details.
  • $postid – the id of the post that has been created.
add_filter('postie_email_notify_recipients', 'my_postie_email_notify_recipients', 10, 3);

function my_postie_email_notify_recipients($recipients, $postemail, $postid) {
    $recipients[] = 'wayne@postieplugin.com';
    return $recipients;
 }

Filter: postie_email_reject_recipients

This filter is called before a reject notification email is sent and can be used to modify the recipient list.

At the point the filter is called there is no post created.
Parameters:
  • $recipients – an array of email address that the email will be delivered to.
  • $postemail – an array that represents the parsed email. See filter: postie_post_pre for more details.
add_filter('postie_email_reject_recipients', 'my_postie_email_reject_recipients', 10, 2);

function my_postie_email_reject_recipients($recipients, $postemail) {
 $recipients[] = 'wayne@postieplugin.com';
 return $recipients;
 }

1.8.7 Released

  • Make code compatible with PHP 5.2
  • Fix bug where the connection tried to use TLS even though it shouldn’t
  • Switch to stream API vs sockets since sockets don’t seem to be installed typically and the stream API is core.
  • Allow self signed certificates with socket connections
  • Don’t check peer name with socket connections, many hosting companies aren’t configured correctly

1.8.6 Released

  • Fix bug where the featured image was not included even though config said it should be.
  • Ensure Socket connections try to connect with TLS 1.0, 1.1 and 1.2 if SSL is specified.
  • Additional logging to help diagnose cURL issue.

1.8.4 Released

This is a major technical release which moves away from the php-imap library and gives you the choice of connecting to the mail server via sockets (default) or curl (required for WPEngine hosted sites).

There are a lot of improvements besides the connection options:

  • New icon set thanks to Chris Lacey
  • php-imap replaced by cURL and Socket connection – work sponsored by xsell.net
  • TLS automatically detected, setting removed
  • Ignore mail state no longer supported, setting removed
  • Header array in filter_email3 and postie_post_before filters have changed format
  • Fixed paragraph detection in plain text when removing newlines
  • Removed old partially functioning forward detection logic
  • Transform “[cid:xxx-xx-xx]” references gmail adds to image references.
  • Add new filter: postie_post_pre that runs after the email is parsed, but before any changes are made.
  • Fixed improper decoding of encoded headers when multiple ‘encoded-words’ are present.
  • Fix to allow multiple #img# reference to the same image.
  • The default video 1 template is now ‘vshortcode’
  • New option: Text fallback. Falls back to plain if html is blank and vice versa.
  • Support removing featured image from html
  • Gallery shortcode handling is now correct when there are both images and non-images.