• Resolved loadofbikes

    (@loadofbikes)


    I append headers to all emails from my website viawp_mail filter, however for WordFence Alert (!) emails any headers I add get concatenated onto the Content-Type value, producing malformed headers that strict MTAs (e.g. Amazon SES) reject with InvalidParameterValue

    In my FluentSMTP email log I see the following for the failed WordFence Alert emails:

    "content-type": "text/htmlReply-To: ..."

    This is about the[Wordfence Alert] Problems found on... emails — not the Activity Log digest, which send fine.

    The solution would be to add a trailing \r\n to that content-type (following RFC 2822).

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @loadofbikes, thanks for your message.

    The wp_mail() docs don’t specify CRLF as required when using the string format, but they do say it’s not required when using the array format – so we could look at adjusting all calls to use arrays instead.

    We have added this to our development schedule and although we can’t officially specify release dates or timescales here on the forums, it’s something we think will be beneficial.

    In the short term, you may be able to add a \r\n if not already present in the headers when your filter runs. Just make sure it doesn’t become \r\n\r\n for emails where you’re not experiencing the issue, as it’d end the block of headers.

    Many thanks,
    Peter.

    Thread Starter loadofbikes

    (@loadofbikes)

    Thank you very much for the thorough reply, Peter!

    Glad to hear it’s on the roadmap. For now I have made a custom change for those specific emails, which nor are sent.

    Kind regards,
    Edmund

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

You must be logged in to reply to this topic.