• Dang, it’s sad to see that this plugin hasn’t been updated in years. It’s one of the better plugins out there, and is a valuable addition to any site that is trying to be secure.

    If the plugin author ever gets around to updating it, might I suggest to write the email message text in blocks of 512 characters max, rather than as one continuous line. RFC 5322 (Internet Message Format), Section 2.1.1, says that 998 character is the absolute limit of any one line.

    Most modern mail systems will accept messages with any arbitrary long lines, but there are a surprising number that still enforce the limit. In those cases, you’ll constantly get errors like this:

    This message was created automatically by mail delivery software.

    A message that you sent could not be delivered to one or more of its
    recipients. This is a permanent error. The following address(es) failed:

    [email protected]
    SMTP error from remote mail server after end of data:
    host old-server.example.com [127.0.0.1]:
    550 Maximum line length exceeded (see RFC 5322 2.1.1).

    […]

    This makes it fairly messy when the message alerts go out, only to be returned. Just limiting the maximum line length to 512 will solve this problem.

    Great work on the plugin – thanks!
    Bruce

    https://www.ads-software.com/plugins/wordpress-file-monitor/

Viewing 1 replies (of 1 total)
  • an easier solution would be to simply Add CRLF to the wp_mail calls since emails have a max line of 998 bytes. I implemented this years back for this plugin and it still works like a charm.

    You’d have to set up a filter: add_filter(‘wp_mail’,…) and inside the filter you’d simply add the CRLF to the message key’s value via searching for the </tr> and replacing it with a </tr>\r\n

    Very easy solution.

    As bonus i also fixed an issue with wordpress (not related to this plugin) for DKIM signatures (also using a little known/used filter).

Viewing 1 replies (of 1 total)
  • The topic ‘Email message line length too long’ is closed to new replies.