• When using the resend button to send HTML emails, the recipient only gets the raw html code.
    The problem is in PostmanEmailLogController/resendMail
    The wp_mail function here uses the headers as retrieved by get_post_meta, however, the value for $meta_values [‘original_headers’] [0] is a php serialized array.

    If this is unserialized it works correctly, so adding the line:
    $meta_values [‘original_headers’][0] = unserialize($meta_values[‘original_headers’][0]);
    solves it (wp_mail accepts an array for headers)

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    Thank you for finding the bug, I had a few tickets about that but didn’t find the time to debug.

    I would love to give you a credit if you interesting, you can write the details here or at https://postmansmtp.com/contact

    Hi,

    Firstly thanks for the awesome plugin. It’s the best SMTP plugin ever.

    I have the same issue. I was wondering when will this be fix. Is it possible to fallback to the earlier version?

    Hi guys, I tried the following based on @dawolfey recommendation without any success. It’s still sending the raw HTML. Can you guys help please? Thanks.

    $success = wp_mail( $to, $meta_values ['original_subject'] [0], $meta_values ['original_message'] [0], $meta_values ['original_headers'] [0] = unserialize($meta_values ['original_headers'] [0]) );

    Thread Starter dawolfey

    (@dawolfey)

    Just paste the line of code I gave in just before the wp_mail line, no need to alter the wp_mail line at all.

    Thank you very much dawolfey!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Resending HTML Email failure, raw html sent’ is closed to new replies.