Hi All, Im having a bit of a issue with my web host, i have created a site but the email will not send as I need to put a fith parameter into the code…this is the reply i had from stream line:
To stop misuse of your form by third parties the sendmail_from variable should
be set to your Streamline hosted email address. While access to the php.ini
file is restricted on our shared environment, you can send this variable using
the ini_set() command, shown below. A fifth parameter, -f, should be added to
the sendmail function. This will set the name of the from email address.
In its basic form, a simple sendmail script will look like this:
[php]ini_set(“sendmail_from”, "[email protected]");
mail($email_to, $email_subject, $email_message, $headers, "[email protected]");[/php]
my prolem is my script looks nothing like this so where do i need to put the 5th parameter…ARRHHH, below is my script, any help would be great.
include “…/res/imemail.inc.php”;
//Form Data
$txtData = “”;
$htmData = “”;
$txtData .= “Customer Name: " . $_POST[“Itm_8_00_1”] . “\r\n”;
$htmData .= “
$txtData .= “Customer Phone Number: " . $_POST[“Itm_8_00_2”] . “\r\n”;
$htmData .= “
$txtData .= “Email Address: " . $_POST[“Itm_8_00_3”] . “\r\n”;
$htmData .= “
$txtData .= “Date From: " . " " . $_POST[“Itm_8_00_4_m”] . " " . $_POST[“Itm_8_00_4_d”] . " " . $_POST[“Itm_8_00_4_y”] . “\r\n”;
$htmData .= “
$txtData .= “Date To: " . " " . $_POST[“Itm_8_00_5_m”] . " " . $_POST[“Itm_8_00_5_d”] . " " . $_POST[“Itm_8_00_5_y”] . “\r\n”;
$htmData .= “
$txtData .= “Type of Accomadation: " . $_POST[“Itm_8_00_6”] . “\r\n”;
$htmData .= “
$txtData .= "Message: " . $_POST[“Itm_8_00_7”] . “\r\n”;
$htmData .= “
// Template
$htmHead = “<table width=“90%” border=“0” bgcolor=”#FFFFFF" cellpadding=“4” style=“font: 11px Tahoma; color: #000000; border: 1px solid #BBBBBB;”>";
$htmFoot = “”;
//Send email to owner
$txtMsg = “”;
$htmMsg = $htmHead . “
$oEmail = new imEMail(($imForceSender ? $_POST[“Itm_8_00_3”] : "[email protected]"),“[email protected]”,“Booking Enquiry”,“iso-8859-1”);
$oEmail->setText($txtMsg . “\r\n\r\n” . $txtData);
$oEmail->setHTML("<body bgcolor="#063A69">" . $htmMsg . “
” . $htmHead . $htmData . $htmFoot . “”);
$oEmail->send();
//Send email to user
$txtMsg = “Thank you for Submitting Your Enquiry to Us, We will Reply to as soon as possible. \r\n\r\nBobby Bees”;
$htmMsg = $htmHead . “
Bobby Bees
$oEmail = new imEMail("[email protected]",$_POST[“Itm_8_00_3”],“Your Booking Enquiry has been Received”,“iso-8859-1”);
$oEmail->setText($txtMsg);
$oEmail->setHTML("<body bgcolor="#063A69">" . $htmMsg . “”);
$oEmail->send();
@header(“Location: …/index.html”);