Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Emailing form problem

Status
Not open for further replies.

Marianng7282

Programmer
Mar 22, 2005
1
US
Hi,

I wrote a form that uses a php script to email all the data in html format. This is a pretty lengthy and takes up about 2 pages when printed. It used to work perfectly fine. Now it does everything except for email the form. It displays all the results on the results page but no email goes through. After doing alot of troubleshooting the other day I doticed that an email stops going out after I add a certail amount of rows to the html table that is being sent in the amail. For example this will go through :
$message = "
<html><head><title>Applications Requested</title></head>
<body>
<table width='100%' border='0'>
<tr>
<td><h2>New Account Form</h2></td>
</tr>
<tr>
<table width='100%' border='1'>
<tr>
<td width=50%>Date:</td>
<td width=50%></td>
</tr>
</table>
</tr>
</table>

</body>
</html>
";

But this will not:
$message = "
<html><head><title>Applications Requested</title></head>
<body>
<table width='100%' border='0'>
<tr>
<td><h2>New Account Form</h2></td>
</tr>

<tr>
<table width='100%' border='1'>
<tr>
<td width=50%>Date:</td>
<td width=50%>$date&nbsp;</td>
</tr>

</table>
</tr>
</table>

</body>
</html>
";

If anyone has any suggestions at all I would really appreciate hearing them.
 
How are you sending the mail?
Make use of the phpmailer.sourceforge.net PHPMailer class which enables you to send HTML mail and follow all requirements for the RFC.
It's easy to implement and will save you a lot of headaches.

I have no rational explanation for the behavior of your script - at least from the examples. Without seeing the code it is impossible to make any helpful statements beyond recommending PHPMailer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top