• Hi, I am using postie_file_added action hook and I am testing for image attachments exactly as in the documentation.

    I can see that after some time the code does not recognize anymore the mimetype of images. A simple service restart for IIS fixes the issue. For a while, that it.

    How to fix it permanently, or at least how to debug the issue?

    PHP error log says this:
    Postie [error]: 58c66e1782eed has an unsupported MIME type message and was not added.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Wayne Allen

    (@wayneallen-1)

    This is a little strange to me as Postie uses standard WordPress functions to determine the mime type.
    If you can replicate the issue you can try installing the Support AddOn so I can see the full context of what is happening.
    http://postieplugin.com/downloads/support-addon/

    Thread Starter Richard Vencu

    (@rvencu)

    Yes, it is strange. It works for some time then suddenly it stops working. Resetting the IIS service gives me another few days with working code.

    Since I posted this thread I decided to change the if line as follows:

    $ext = $fileinfo['ext'];
    //if (strpos($mimetype, 'image', 0) === 0) { //only if attachment is an image
    if (in_array($ext,array("jpg","jpeg","png","bmp"))) {

    After this the issue never reoccured. It is fine for me as it is now. If the issue still happens I will install the support plugin and try to track it down.

    Is there a solution to save images that are embedded in HTML email instead of being attached?

    • This reply was modified 9 years, 2 months ago by Richard Vencu.
    Plugin Author Wayne Allen

    (@wayneallen-1)

    So it turns out that a change was made to WordPress at version 4.7.2 which makes it more picky about file names and mime types. Postie 1.8.35 has almost the same fix you came up with.

    Thread Starter Richard Vencu

    (@rvencu)

    Thanks for confirming this.

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Please let me know if Postie 1.8.35 fixes this issue for you.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘postie_file_added issues’ is closed to new replies.