We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36875
    • 5 Posts
    I noticed that when I type something in my form like this:

    I have...

    an idea.

    after Formit had e-mailed it (as HTML, which is the default), Outlook would just show this:

    I have ... an idea.

    This is probably a very simple problem to many of you but I still thought I’d save people some time by posting my solution. In core/components/formit/model/formit/fihooks.class.php, in the function called ’email’, there is a line like this:

    $this->modx->mail->set(modMail::MAIL_BODY, $message);


    I changed that to this:

    $this->modx->mail->set(modMail::MAIL_BODY, nl2br($message));


      • 19726
      • 239 Posts
      Are you sure that it is not just the "remove linebreaks" option in Outlook that is enabled?

      By default that option is on and linebreaks can get removed resulting in the behaviour you described. If I remember correctly Outlook even shows a little message when it removes linebreaks. Unforunately I can not check that right now because I am not at work.