Help with mail code.
I'm experiencing massive frustration with the code I have for sending me form data. It usually works. When I test it, it always works. But now and again, it seems to just .. not work. The most recent incarnation, it sent the confirmation email (the third "mail" function), but not the first two. I have no clue what is going wrong, since it always works right when I test it.
I've contacted the hosting company a couple of times, since at first I thought maybe it was a problem with the second address, but this last one didn't get sent to me, either.
Any advice?
(Email addresses change in a vain attempt to stop the spam)
$heading="<p align=right style=\"width: 400px;\"><table width=\"150px\"><tr><td align=center style=\"border: 2px black solid;color: gray;\">FOR BEP <br>USE<br> ONLY<br></td></tr></table></p>";
$today=date("d M Y");
$datetext="<p align=left>Date of submission: $today</p>";
$contactinfo="<p align=left style=\"width: 400px;\"><b>Contact information</b><br>Contact: $contact<br>Institute: $institution<br>Mailing address: $address<br>Telephone #: $phone<br>Fax #: $fax<br>Email: $email</p>";
$projectinfo="<p align=left style=\"width: 400px;\"><b>Travel information</b><br>Number of Travelers: $numtravel<br>Budget: $budget<br>Duration: $duration</p>";
$abstract="<p align=left style=\"width: 400px;\"><b>Purpose of travel:</b> $purpose<br>
<b>Itinerary:</b> $itinerary</p>";
$objects="<p align=left style=\"width: 400px;\"><b>BEP Objectives:</b> $objectives</p>";
$project=$heading.$datetext.$contactinfo. $projectinfo.$abstract.$objects;
mail ("myemail@myplace.org","Submission: Travel & Training Application (lhilton)", "$project","From: $email\n"."MIME-Version: 1.0\n"."Content-type: text/html; charset=iso-8859-1");
(mail ("emaillist@myplace.org","Submission: Travel & Training Application", "$project","From: $email\n"."MIME-Version: 1.0\n"."Content-type: text/html; charset=iso-8859-1");
if (!empty($email)){
mail ("$email","Confirmation of submission for Travel & Training project", "$project","From: $email\n"."MIME-Version: 1.0\n"."Content-type: text/html; charset=iso-8859-1");
}
I've contacted the hosting company a couple of times, since at first I thought maybe it was a problem with the second address, but this last one didn't get sent to me, either.
Any advice?
(Email addresses change in a vain attempt to stop the spam)
$heading="<p align=right style=\"width: 400px;\"><table width=\"150px\"><tr><td align=center style=\"border: 2px black solid;color: gray;\">FOR BEP <br>USE<br> ONLY<br></td></tr></table></p>";
$today=date("d M Y");
$datetext="<p align=left>Date of submission: $today</p>";
$contactinfo="<p align=left style=\"width: 400px;\"><b>Contact information</b><br>Contact: $contact<br>Institute: $institution<br>Mailing address: $address<br>Telephone #: $phone<br>Fax #: $fax<br>Email: $email</p>";
$projectinfo="<p align=left style=\"width: 400px;\"><b>Travel information</b><br>Number of Travelers: $numtravel<br>Budget: $budget<br>Duration: $duration</p>";
$abstract="<p align=left style=\"width: 400px;\"><b>Purpose of travel:</b> $purpose<br>
<b>Itinerary:</b> $itinerary</p>";
$objects="<p align=left style=\"width: 400px;\"><b>BEP Objectives:</b> $objectives</p>";
$project=$heading.$datetext.$contactinfo.
mail ("myemail@myplace.org","Submission: Travel & Training Application (lhilton)", "$project","From: $email\n"."MIME-Version: 1.0\n"."Content-type: text/html; charset=iso-8859-1");
(mail ("emaillist@myplace.org","Submission: Travel & Training Application", "$project","From: $email\n"."MIME-Version: 1.0\n"."Content-type: text/html; charset=iso-8859-1");
if (!empty($email)){
mail ("$email","Confirmation of submission for Travel & Training project", "$project","From: $email\n"."MIME-Version: 1.0\n"."Content-type: text/html; charset=iso-8859-1");
}
