We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10313
    • 375 Posts
    Hello,

    I’m using a chunk for the report. The report is mailed as text (not HTML). To give the mail some structure, i have added some empty lines. But these empty lines do not appear in the email.

    My report is
    Feedback über QM-Formular
    
    Name: [+vorname+] [+nachname+]
    
    Anschrift:
    [+anschrift+]
    
    Telefon: [+telefon+]
    Fax: [+fax+]
    E-Mail: [+email+]
    
    Anfrage
    [+anfrage+]


    The end-of-lines are "displayed" correct in my email, but the empty lines are completely omitted, so that I receive such a mail:

    Feedback über QM-Formular
    Name: vorname nachname
    Anschrift:
    anschrift
    Telefon: telefon
    Fax: fax
    E-Mail: email
    Anfrage
    anfrage


    How can I add empty lines to my report? "\n" does not work (it is send as-is "\n"). I’m using evo 1.0.2 with eForm 1.4.4.6.

    Thanks in advance
    Martin
      • 8609
      • 607 Posts
      Try
      tags where you want the empty lines
        • 10313
        • 375 Posts
        Doesn’t work sad

        I get the
        in my report. I’m using sendAsText=`1` ... and I resp. the customer wants it so.
          • 10313
          • 375 Posts
          Okay i have tested it on a different server (with a different ISP). On that second server, it works as expected. Empty lines in the report are sent as empty lines in the email. So this must be a server-side issue.

          I have already tried "
          ", "
          ", "
          ", "/n", " " and " " in the report (on server 1), but they all are output as typed in.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Sounds like an overzealous "escape" function somewhere, where your normal newlines (\n) are getting an extra \ (\\n) so they end up being sent out as a text \n instead of a newline character. (you did use \n and not /n, right?)
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 10313
              • 375 Posts
              Yep, I did use "\n", not "/n". Sorry for mistyping.
                • 16278
                • 928 Posts
                Would a space character on your "empty" line be preserved?
                smiley KP
                  • 10313
                  • 375 Posts
                  No, unfortunately, this does not work, either.

                  Thanks
                  Martin