...

View Full Version : Form return - Outlook issue



Daf
10-22-2009, 05:04 PM
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! :confused:

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

Fumigator
10-22-2009, 05:39 PM
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:



$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 :thumbsup:

Daf
10-22-2009, 07:45 PM
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!

Daf
10-22-2009, 08:14 PM
Call off the dogs!

But thanks so much for the reply! :thumbsup:

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum