+ Reply to Thread
Results 1 to 6 of 6

Thread: Blank lines in email

  1. #1
    Join Date
    Oct 2011
    Posts
    7

    Default Blank lines in email

    I have been trying to figure out how to add in blank lines (carriage return/line feed) in the email sent with Formmail. Specifically, I wanted to add a blank line after a form field generated by a derive_fields field, but I'd be happy enough with a space between all the lines.
    I have tried adding in \n to the derive_fields expression, both with and without single quotes, and with and without % brackets. I have tried various combinations of \r and \n. I have tried ASCII characters like 0A and 0D (and various combinations of single quotes and % brackets). I have even tried tinkering with the BODY_LF and HEAD_CRLF. All to no avail.
    It seems like the script suppresses any line feeds somewhere but I can't find where.
    Any ideas anyone?

  2. #2
    Join Date
    Dec 2003
    Posts
    3,978

    Default Re: Blank lines in email

    Hi,

    The easiest way to get the formatting you want is with a template. Either PlainTemplate or HTMLTemplate, depending on your requirements.

    FormMail does strip fields of various things, including line breaks; primarily for security reasons.

    There is a feature called "mail_options" and it has an option called "KeepLines". This will keep line feeds within most fields.

    I hope that helps.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Oct 2011
    Posts
    7

    Default Re: Blank lines in email

    Hi Russell,
    That's pretty fast service! Thanks.
    It is a very LONG form I am dealing with, and so I was hoping to avoid having to do a template. Is there no easy way, then, to hard-wire in a blank line between every field reported in the email?

    Luke

    Quote Originally Posted by russellr View Post
    Hi,

    The easiest way to get the formatting you want is with a template. Either PlainTemplate or HTMLTemplate, depending on your requirements.

    FormMail does strip fields of various things, including line breaks; primarily for security reasons.

    There is a feature called "mail_options" and it has an option called "KeepLines". This will keep line feeds within most fields.

    I hope that helps.

  4. #4
    Join Date
    Dec 2003
    Posts
    3,978

    Default Re: Blank lines in email

    Hi,

    Well, you can use derive_fields and add on the linefeed, but you're going to have to list every field you want to do this with.

    So, it's no quicker than creating a template, and much more complicated.

    If you're really desperate to do this, send me the URL for your form and I can send you a quote to create a template for it.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Oct 2011
    Posts
    7

    Default Re: Blank lines in email

    OK, thanks for your help anyway. I figured it might be possible to add in a \n or something somewhere in the code itself (where the fields are listed for inclusion in the email), but my PHP is not good enough to figure out where. But if it can't be done, it can't be done. No problems. Thanks.

    Luke

    Quote Originally Posted by russellr View Post
    Hi,

    Well, you can use derive_fields and add on the linefeed, but you're going to have to list every field you want to do this with.

    So, it's no quicker than creating a template, and much more complicated.

    If you're really desperate to do this, send me the URL for your form and I can send you a quote to create a template for it.

  6. #6
    Join Date
    Apr 2012
    Posts
    1

    Default Re: Blank lines in email

    Quote Originally Posted by russellr View Post
    Hi,

    The easiest way to get the formatting you want is with a template. Either PlainTemplate or HTMLTemplate, depending on your requirements.

    FormMail does strip fields of various things, including line breaks; primarily for security reasons.

    There is a feature called "mail_options" and it has an option called "KeepLines". This will keep line feeds within most fields.

    I hope that helps.
    Thank you so much for the reply!
    I've used PlainTemplate once and it seemed rather good that time. I'll definitely try applying it to the blank lines.




    ________________
    Family tree maker

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Blank email message
    By leenfischer in forum Community Support
    Replies: 10
    Last Post: 26-Aug-2010, 08:01 PM
  2. exclude blank fields in email
    By spiderling in forum Community Support
    Replies: 1
    Last Post: 15-Jun-2010, 02:01 AM
  3. From email address is now blank
    By DaveInFL in forum Community Support
    Replies: 12
    Last Post: 07-Jan-2010, 01:16 AM
  4. Allow forms with blank email field
    By ActionAmerica in forum Community Support
    Replies: 11
    Last Post: 24-Jun-2009, 12:21 AM
  5. I need blank lines in csv file
    By kellyandshyla in forum Community Support
    Replies: 2
    Last Post: 17-Oct-2007, 05:03 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts