Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Daf
    Daf is offline
    Regular Coder
    Join Date
    Feb 2005
    Location
    East Texas
    Posts
    140
    Thanks
    32
    Thanked 2 Times in 2 Posts

    Form return - Outlook issue

    Hi all,

    I'm having a problem with a form I use. It's a simple html form with the php mailer. For some strange reason the last couple of forms have developed this issue with no honoring the \n line break at random spots in the returns.

    Here is the e-mail with the results of the form:
    Full Name: Daffydd Morgan
    Date: 10/22/2009
    Address: 216 Willowbrook Lane
    Home Phone: xxx-xxx-xxxx
    Work Phone: xxx-xxx-xxxx
    Cell Phone: xxx-xxx-xxxx
    Fax Number 903-581-4477
    Email: web@ktdb.com
    Date of Birth: 04/22/1957
    Social Security Number xxx-xx-xxxx
    Drivers License Number: xxxxxxxxxxx
    Employer: Gleiser Communications LLC
    May we contact you at work? Yes
    Why you would like to become a volunteer? I like animals What volunteer experiences have you enjoyed? I used to train spider monkeys Have you had prior experience at an animal shelter or in a related field? Yes If so where? Spider Monkey Villages Are you currently a member of the HUMANE SOCIETY OF EAST TEXAS or any other animal welfare/rights organization? Yes If so, what organizations? Peta What are your feelings about interacting with all types of people? I hate people What special skills would you like to use at the HUMANE SOCIETY OF EAST TEXAS animal shelter? Foreign languages Do you have any physical, medical, or psychological limitations, disabilities or allergies? I\'m quadriplegic Date of last tetanus shot? 12/25/1965 Do you have medical insurance? Yes Volunteer job opportunities that interest you: Foster Homes, Humane Education IP Address: xx.xxx.xxx.xxx
    As you can see the lines are not breaking after "Why you would like to become a volunteer? I like animals" - but - and this is a weird one - this is only occurring in Outlook. In both Outlook Express and Thunderbird it is behaving normally!

    If I put \n\n instead, in that trouble spot, I actually get a double line break - just seems to be a problem with the single break....

    I'm attaching the php mailer here as a txt file (so it will upload) - the form is here: removed


    I've stared at it so long I'm sure I'm not seeing something obvious so hopefully I can get some fresh eyes on it here. Thanks so much for the help!

    Daf
    Attached Files Attached Files
    Last edited by Daf; 10-22-2009 at 09:14 PM.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    I have no crap-kickin idea why those line breaks are failing in Outlook, but maybe if you try this alternate coding you can get around it:

    PHP Code:
    $msg "
    Full Name: $name
    Date: $date
    Address: $address
    Home Phone: $hphone
    Work Phone: $wphone
    Cell Phone: $cphone
    Fax Number $fax
    Email: $fromemail
    Date of Birth: $dob
    Social Security Number $ss
    Drivers License Number: $dlnumber
    Employer: $employer
    May we contact you at work? $contactwork
    Why you would like to become a volunteer? $why
    What volunteer experiences have you enjoyed? $experiences
    Have you had prior experience at an animal shelter or in a related field? $prior
    If so where? $where
    Are you currently a member of the HUMANE SOCIETY OF EAST TEXAS or any other animal welfare/rights organization? $member
    If so, what organizations? $organizations
    What are your feelings about interacting with all types of people? $feelings
    What special skills would you like to use at the HUMANE SOCIETY OF EAST TEXAS animal shelter? $skills
    Do you have any physical, medical, or psychological limitations, disabilities or allergies? $allergies
    Date of last tetanus shot? $tetanus
    Do you have medical insurance? $insurance
    Volunteer job opportunities that interest you: $opportunities
    IP Address: $pfw_ip
    "
    ;

    elseif (
    mail($toemail,"HSOET Volunteer Application",$msg,$headers2)) {
      
    mail($fromemail,"HSOET Volunteer Application Confirmation",$c_message,$headers);

      echo 
    "<meta http-equiv=\"Refresh\" content=\"0;url=".$c_url."\">";

      echo 
    "<h4>If you are not redirected automatically, <a href=\"".$c_url."\">click here</a>.";

    } else {

      echo 
    "<h4>Can't send email to $email</h4>";


    This is a shot in the dark... worth the cost of the ammo

  • Users who have thanked Fumigator for this post:

    Daf (10-23-2009)

  • #3
    Daf
    Daf is offline
    Regular Coder
    Join Date
    Feb 2005
    Location
    East Texas
    Posts
    140
    Thanks
    32
    Thanked 2 Times in 2 Posts
    Hi fumigator - thanks so much for the response!

    I must not be inserting the code correctly as I continue to get this error ...

    Parse error: syntax error, unexpected T_ELSEIF in /home/hsoet/public_html/mailers/mailvolunteer.php on line 193
    I'm afraid I don't know much about troubleshooting php

    Thanks again!

  • #4
    Daf
    Daf is offline
    Regular Coder
    Join Date
    Feb 2005
    Location
    East Texas
    Posts
    140
    Thanks
    32
    Thanked 2 Times in 2 Posts
    Call off the dogs!

    But thanks so much for the reply!

    The solution here, rather than try to outsmart the crafty Office product, is to use the double space (\n\n) since that works. The client actually likes that better as well - it's easier to read the returned values.

    Thanks!
    Daf


  •  

    Posting Permissions

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