0

A client has just recently seen this happening on Freeform (Free) notifications. We've set the notification settings to HTML and Word Wrap, and added just basic HTML (ie. we've not included html, head, body tags etc.) but just started with < p > tags.

The output looks like this:

Thank you for choosing our company.

---------= ------------------------------------

Your 60-day application evalu= ation and agreement was successfully sent and a member of our team will be = in contact with you shortly.

Anyone else seen this, or know why its happening?

FreeForm 4.1.3 + EE 2.7.2

  • Just seen this happening on another site of ours (EE 2.5.5/FF 4.1.8). Knocking off the HTML option and resorting to plain text seems to remove it, but it would be nice to be able to send HTML formatted messages. – Andrew Armitage May 26 '14 at 20:10
1

After some more bug hunting, I think I've tracked this down - and the scenario would apply both sites we've seen this behaviour on.

I figured Freeform would be using a wordwrap value from an existing CI or EE class, and sure enough in codeigniter/system/libraries/email.php, there is the following code.

    // Set the character limit
    // Don't allow over 76, as that will make servers and MUAs barf
    // all over quoted-printable data
    if ($charlim == '' OR $charlim > '76')
    {
        $charlim = '76';
    }

Guess what, the random characters were popping in at this cut off.

While in this file, a few lines further down I came across the following:

        // Loop through each character in the line to add soft-wrap
        // characters at the end of a line " =\r\n" and add the newly
        // processed line(s) to the output (see comment on $crlf class property)

Then came the light bulb moment! We were using SMTP in the EE mail configuration, and to get this working, we'd had to add the following to the config.php file.

$config['email_newline'] = "\r\n";
$config['email_crlf'] = "\r\n";

So that seems to explain the '=' characters appearing. Obviously the quick fix is to the change the SMTP server, or use a different email config option in EE :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.