My Php function is performing all the proper operations and posting the proper information to the screen on the web, but the automatic email copy is not being sent and it creates a "dead letter" error at the bottom of the screen.
This software has worked quite well for several years and suddenly stopped working last week. The server host swears nothing has changed, but I have my doubts.
Please help.
Here is the error:
😕
/home/u4/company/dead.letter... Saved message in /home/u4/company/dead.letter
Here is my code:
<?php
//****************************************************************************
//
//
$include_path = "include/";
include $include_path."defines.php";
include $include_path."jrocStyle.php";
include $include_path."jrocQuoteFormFunctions.php";
HTML_Header("Price Estimate", "", "", "", "", "", "");
// Check to see if we have a valid set of info entered:
if( GLValidateQuoteSubmission() )
{
// print out the Quotes Header
$returnedtext = GLumberLetterHead();
$returnedtext .= GLFormTitle( "PRICE ESTIMATE" );
$returnedtext .= GLCustomerInfoSection();
$returnedtext .= GLOrderInfoSection();
$returnedtext .= GLumberTerms();
//add From: header
$headers = "From: Company <email@server.com>\r\n";
//specify MIME version 1.0
$headers .= "MIME-Version: 1.0\r\n";
//unique boundary
$boundary = uniqid("HTMLDEMO");
//tell e-mail client this e-mail contains//alternate versions
$headers .= "Content-Type: multipart/mixed; boundary = $boundary\r\n\r\n";
//HTML version of message
$body .= "--$boundary\r\n" .
"Content-Type: text/html; charset=ISO-8859-1\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n";
$body .= chunk_split(base64_encode($returnedtext));
//send message
mail("archive@server.com", "A New Quote", $body, $headers);
}
else
{
echo( "<br><A HREF=\"JavaScript:history.back()\">Go back to the Quote Form </A>\n" );
echo( "<br><A HREF=\"http://server.com\">Go to Home Page </a>\n" );
}
HTML_Bottom();
?>