PHP mail form not working correctly

On my webserver I have a Flash built site (www.autoholtkamp.nl) which has a car taxation form. Somehow it sends the mail twice and the html is not rendered in the incoming mail. The form field values are showing correctly in the mail, so my guess there is nothing wrong with the flash-files. Attached are the mail form and the result mail.  
Server info: www.autoholtkamp.nl/phpinfo.php

Can someone please help?

TaxatieMail.php
result-mail-content.txt
JaapVAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

KalpanCommented:
Try out sending the mail using the script running to see the mail function works.

Try debugging your message code to see actually it renders correctly.

It seems code is fine...but $message is not gettting the values.

use if(mail) only without == true condition.

0
JaapVAuthor Commented:
I tried this:
	if (mail($toEmail, $subject, $message, $headers))  

Open in new window

instead of this:
	if (mail($toEmail, $subject, $message, $headers) == true) 

Open in new window

but no result. Don't know if I followed your instructions correctly.
0
nanharbisonCommented:
As far as the html not rendering, you have to do the html like we used to when websites were first built, even less sophisticated than inline CSS

<td ><font size="10pt" face="Arial, Helvetica, sans-serif">
 </font></td>

Open in new window

0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

nanharbisonCommented:
Try sending the email with only one email address. And why are you adding slashes to the request email address?
change:
$toEmail  	= "info@autoholtkamp.nl, " . $email;

to:
$toEmail  	= "info@autoholtkamp.nl";

Open in new window

0
JaapVAuthor Commented:
Thanks, the website (and mailscript) was built by someone else, it's just hosted on my webserver. My client does not want to contact the builder for whatever reason. The script used to work fine, also on my server.
I'll try your suggestions and get back to you.
0
JaapVAuthor Commented:
change:
$toEmail        = "info@autoholtkamp.nl, " . $email;

to:
$toEmail        = "info@autoholtkamp.nl";

Open in new window

This didn't work. The mail still was sent twice and the html wasn't rendered either.
I tried deleting all the CSS and that also had no result.
Any suggestions?
0
JaapVAuthor Commented:
In my opinion it's a server setting that screws the script. Server info: www.autoholtkamp.nl/phpinfo.php
0
nanharbisonCommented:
Can we see all of the code? If this is being sent twice, it is not in the code you gave us.
Who set up your web server?
0
JaapVAuthor Commented:
What code do you want to see? The mailscript in the attached file is all the code.
The server is set up by my hosting provider. This script is the only mailscript on a lot of sites on that server that has this problem.
0
JaapVAuthor Commented:
Any takers? The problem still exists
0
JaapVAuthor Commented:
The e-mail source code:
From - Thu Jan 05 15:26:22 2012
X-Account-Key: account5
X-UIDL: UID3855-1267699975
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:                                                                                 
X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on s1.veldhorst.nl
X-Spam-Level: *
X-Spam-Status: No, score=1.9 required=7.0 tests=AWL,HTML_MESSAGE,
	MIME_HTML_ONLY,NO_RELAYS autolearn=no version=3.2.4
Received: (qmail 12944 invoked by uid 48); 5 Jan 2012 15:25:51 +0100
Date: 5 Jan 2012 15:25:51 +0100
Message-ID: <20120105142551.12942.qmail@s1.veldhorst.nl>
To: info@autoholtkamp.nl, info@webenprint.nl
Subject: AutoHoltkamp taxatie aanvraag bevestiging.
MIME-Version: 1.0

Content-type: text/html; charset=UTF-8

To: info@autoholtkamp.nl, info@webenprint.nl
From: AutoHoltkamp <no-reply@autoholtkamp.nl>
X-Antivirus: AVG for E-mail 10.0.1416 [2109/4123]
X-AVG-ID: ID42B551CD-201B04DC



	<style type="text/css">
		<!--
		.normaal {
			font-size: 10pt;
			font-family: Arial, Helvetica, sans-serif;
		}	
		
		.tabelBold {
			font-size: 10pt;
			font-weight: bold;
			font-family: Arial, Helvetica, sans-serif;
		}					
		-->
    </style>
    
	<html>
	<head>
	  <title>AutoHoltkamp taxatie aanvraag bevestiging.</title>
	</head>
	<body>
<table width="80%" align="center">
	<tr>
		<td align="center">
		<img src="http://www.autoholtkamp.nl/images/logo_mail.jpg" border="0" align="center"></img><br><br>
		</td>
	</tr>
	<tr>
		<td align="left" class="normaal"><b><font size="3">Taxatie aanvraag.</font></b><br><br>Hartelijk dank voor uw taxatie aanvraag bij AutoHoltkamp.<br>Wij zullen uw  aanvraag zo spoedig mogelijk verwerken en naar u toezenden.<br>Onderstaand ziet u de door u ingevulde gegevens. Mocht er in deze iets niet correct zijn, gelieve dan contact op te nemen met: AutoHoltkamp, E-mail: info@autoholtkamp.nl					
		</td>
	</tr>			

</table>
<br>
<table width="80%" border="1" cellspacing="0" bordercolor="#999999" align="center">
	<tr>
		<td align="left" class="tabelBold" width="180">Voornaam:</td><td class="normaal">&nbsp;Jaap</td>
	</tr>
	<tr>
		<td align="left" class="tabelBold">Achternaam:</td><td class="normaal">&nbsp;Veldhorst</td>
	</tr>
	<tr>
		<td align="left" class="tabelBold">Aanhef:</td><td class="normaal">&nbsp;dhr</td>
	</tr>
	<tr>
		<td align="left" class="tabelBold">Adres:</td><td class="normaal">&nbsp;Kon. Wilhelminalaan 30</td>
	</tr>
	<tr>
		<td align="left" class="tabelBold">Postcode:</td><td class="normaal">&nbsp;7051AS</td>
	</tr>
	<tr>
		<td align="left" class="tabelBold">Woonplaats:</td><td class="normaal">&nbsp;Varsseveld</td>
	</tr>	
	<tr>
		<td align="left" class="tabelBold">E-mail:</td><td class="normaal">&nbsp;info@webenprint.nl</td>
	</tr>	
	<tr>
		<td align="left" class="tabelBold">Mobiel:</td><td class="normaal">&nbsp;</td>
	</tr>	
	<tr>
		<td align="left" class="tabelBold">Telefoon:</td><td class="normaal">&nbsp;0315298787</td>
	</tr>	
	<tr>
		<td align="left" class="tabelBold">Merk en model inruilauto:</td><td class="normaal">&nbsp;pooierbak 8007</td>
	</tr>	
	<tr>
		<td align="left" class="tabelBold">kmstand:</td><td class="normaal">&nbsp;</td>
	</tr>	
	<tr>
		<td align="left" class="tabelBold">kenteken:</td><td class="normaal">&nbsp;AA - BB - CC</td>
	</tr>		
	<tr>
		<td align="left" class="tabelBold">Bouwjaar:</td><td class="normaal">&nbsp;mei, 2004</td>
	</tr>	
	<tr>
		<td align="left" class="tabelBold">APK geldig tot:</td><td class="normaal">&nbsp;april, 2004</td>
	</tr>	
	<tr>
		<td align="left" class="tabelBold">Kleur en Metaallak:</td><td class="normaal">&nbsp;grijs</td>
	</tr>	
	<tr>
		<td align="left" class="tabelBold">Airco:</td><td class="normaal">&nbsp;Ja</td>
	</tr>	
	<tr>
		<td align="left" class="tabelBold">Brandstof:</td><td class="normaal">&nbsp;Benzine</td>
	</tr>
	<tr>
		<td align="left" class="tabelBold">Uw inruilauto verkeert in:</td><td class="normaal">&nbsp;Redelijke staat</td>
	</tr>
	<tr>
		<td align="left" class="tabelBold">Inruilbedrag:</td><td class="normaal">&nbsp;500</td>
	</tr>
	<tr>
		<td align="left" class="tabelBold">Interesse:</td><td class="normaal">&nbsp;Rolls Royce Phantom</td>
	</tr>

</table>
<br>
<table width="80%" align="center">
	<tr>
		<td class="normaal">Deze e-mail is automatisch opgesteld, u kunt niet reageren op deze e-mail.<br>
		E-mail gegenereerd door autoholtkamp.nl taxatieformulier op:05-01-2012 15:25:51</td>
	</tr>
</table>																
</body>
<hr noshade="noshade" size="1"><a></a><p class="avgcert" align="left" color="#000000">Geen virus gevonden in dit bericht.<br>
Gecontroleerd door AVG - <a href='http://www.avg.com'>www.avg.com</a><br>
Versie: 10.0.1416 / Virusdatabase: 2109/4123 - datum van uitgifte: 01/04/12</p></html>

Open in new window

0
nanharbisonCommented:
The problem has to be with the hosting provider. The code you provided only sends the email once.
Who is your hosting provider?
And you tried making the changes to the email to use the old style font tags, and it still doesn't display correctly?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JaapVAuthor Commented:
Thanks, I'll contact my hosting provider. I also tried taking out the html completely, but is still sends the e-mail twice.
0
JaapVAuthor Commented:
The solution wasnt really given, but I now know where to go
0
nanharbisonCommented:
Thanks for the points. I thought there were two problems going on, the second problem was that the html was was sent twice was not displaying correctly?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.