Jump to content

Archived

This topic is now archived and is closed to further replies.

Guest Starko

Form....no emails sent...

Recommended Posts

Guest Starko
Below is the code for the form, i have added the headers so i can send the form to more than one person, and now it won't send at all.

It is online at www.elliotsestateagents.co.uk/admin/sale.php

Can anyone help?

[code]<?PHP
if (isset($_POST['send'])) {
$IDNumber = $_POST['IDNumber'];
$NegotiatorName = $_POST['NegotiatorName'];
$SiteCode = $_POST['SiteCode'];
$VendorsSolicitors = $_POST['VendorsSolicitors'];
$PurchasersSolicitors = $_POST['PurchasersSolicitors'];
$FullChain = $_POST['FullChain'];
$Notes = $_POST['Notes'];

$to_email = "Sales Progressors <test@elliotsestateagents.co.uk>" . ", " ; // Note the dot!
$subject = "New Sale";
$headers = "From: $NegotiatorName <$email>\r\n";
 
/* message body */
$body = "A new sale has occured, below are all of the details:";
$body .= "________________________________________\n\n" ;
$body .= "From: ".$NegotiatorName .". " . $name ." \n";


$body .= "ID Number: ".$IDNumber."\n";
$body .= "Negotiator Name: ".$NegotiatorName."\n";
$body .= "Site Code: ".$SiteCode."\n";
$body .= "Finance: ".$Finance."\n";
$body .= "Items: ".$Items."\n";
$body .= "Full Chain: ".$FullChain."\n";
$body .= "Vendors Solicitors: ".$VendorsSolicitors."\n";
$body .= "Purchasers Solicitors: ".$PurchasersSolicitors."\n";

$body .= "Notes: ".$Notes."\n";

$body .= "________________________________________\n\n" ;
mail($to_email,$subject,$body,$headers);
}
?>[/code]
[code]<?PHP if (isset($_POST['send'])) { echo "<p><strong>Thank you for sbmiting your sale.   We will be in touch shortly.<strong/><br>
</p>
";}?></p>
 <form name="Sale" id="Sale" method="post" action="">
   <table border="0" align="left" cellpadding="2" cellspacing="2">
     <tr class="body">
       <td><div align="right"></div>
         <p>ID Number:<br />
           <input name="IDNumber" type="text" id="IDNumber" size="40" maxlength="40" />
         </p>
         <p>Negotiator Name:<br>
           <input name="NegotiatorName" type="text" id="NegotiatorName" size="40" maxlength="40" />
</p>
         <p>&nbsp;</p>
       </td>
     </tr>
     <tr class="body">
       <td>Notes:<br />
           <textarea name="Notes" cols="30" rows="4" id="Notes" style="scrollbar-base-color:blue;scrollbar-arrow-color:#990000;"></textarea></td>
     </tr>
     <tr class="body">
       <td><input name="Submit" type="submit" class="forms" style="background-color:blue; color:#FFFFFF; border-color:#FF0000" value="Submit"/>
           <input name="send" type="hidden" id="send" value="send" /></td>[/code]

Share this post


Link to post
Share on other sites
Try changing this part:
[code]$to_email = "Sales Progressors <test@elliotsestateagents.co.uk>" . ", "; // Note the dot!
$subject = "New Sale";
$headers = "From: $NegotiatorName <$email>\r\n";[/code]

To:
[code]$to_email = "Sales Progressors <test@elliotsestateagents.co.uk>" . ", "; // Note the dot!
$subject = "New Sale";
$headers = "From: ".$NegotiatorName." <".$email.">\r\n";[/code]

And I dont see why that dot and a comma in the $to_email is there. I think you can remove it, so it'll look like this:
[code]$to_email = "Sales Progressors <test@elliotsestateagents.co.uk>";[/code]

Orio.

Share this post


Link to post
Share on other sites
Guest starko
It is online at www.elliotsestateagents.co.uk/admin/sale.php and it still doesnt work. any ideas?

Share this post


Link to post
Share on other sites
Try this:

[code]<?PHP
if (isset($_POST['send'])) {
$IDNumber = $_POST['IDNumber'];
$NegotiatorName = $_POST['NegotiatorName'];
$SiteCode = $_POST['SiteCode'];
$VendorsSolicitors = $_POST['VendorsSolicitors'];
$PurchasersSolicitors = $_POST['PurchasersSolicitors'];
$FullChain = $_POST['FullChain'];
$Notes = $_POST['Notes'];

$to_email = "test@elliotsestateagents.co.uk"
$subject = "New Sale";
$headers = "From: ".$NegotiatorName." <".$email.">\r\n";
 
/* message body */
$body = "A new sale has occured, below are all of the details:";
$body .= "________________________________________\n\n" ;
$body .= "From: ".$NegotiatorName.". ".$name." \n";


$body .= "ID Number: ".$IDNumber."\n";
$body .= "Negotiator Name: ".$NegotiatorName."\n";
$body .= "Site Code: ".$SiteCode."\n";
$body .= "Finance: ".$Finance."\n";
$body .= "Items: ".$Items."\n";
$body .= "Full Chain: ".$FullChain."\n";
$body .= "Vendors Solicitors: ".$VendorsSolicitors."\n";
$body .= "Purchasers Solicitors: ".$PurchasersSolicitors."\n";

$body .= "Notes: ".$Notes."\n";

$body .= "________________________________________\n\n" ;
mail($to_email,$subject,$body,$headers);
}
?>[/code]

Orio.

Share this post


Link to post
Share on other sites
Guest starko
Again its at www.elliotsestateagents.co.uk/admin/sale.php

Its coming up with an error.

Also i need the form to be sent to about 7 email addresses so i need the CC it?

Thanks.

Share this post


Link to post
Share on other sites
Guest Starko
This is all the code, but for some reason it is not sending and an error is coming up, i also need to add CC addresses.

[code]<?PHP
if (isset($_POST['send'])) {
$IDNumber = $_POST['IDNumber'];
$NegotiatorName = $_POST['NegotiatorName'];
$SiteCode = $_POST['SiteCode'];
$Notes = $_POST['Notes'];

$to_email = "chrisstarkings@elliotsestateagents.co.uk"
$subject = "New Sale";
$headers = "From: ".$NegotiatorName." <".$email.">\r\n";
 
/* message body */
$body = "A new sale has occured, below are all of the details:";
$body .= "________________________________________\n\n" ;
$body .= "From: ".$NegotiatorName.". ".$name." \n";


$body .= "ID Number: ".$IDNumber."\n";
$body .= "Negotiator Name: ".$NegotiatorName."\n";
$body .= "Site Code: ".$SiteCode."\n";
$body .= "Finance: ".$Finance."\n";
$body .= "Items: ".$Items."\n";
$body .= "Notes: ".$Notes."\n";

$body .= "________________________________________\n\n" ;
mail($to_email,$subject,$body,$headers);
}
?>[/code]

Share this post


Link to post
Share on other sites

try know ok.


<?PHP
if (isset($_POST['send'])) {
$IDNumber = $_POST['IDNumber'];
$NegotiatorName = $_POST['NegotiatorName'];
$SiteCode = $_POST['SiteCode'];
$Notes = $_POST['Notes'];

$to_email="chrisstarkings@elliotsestateagents.co.uk";
$subject="New Sale";
$headers="From: ".$NegotiatorName." <".$email.">\r\n";
 
/* message body */
$body = "A new sale has occured, below are all of the details:";
$body .= "________________________________________\n\n" ;
$body .= "From: ".$NegotiatorName.". ".$name." \n";


$body .= "ID Number: ".$IDNumber."\n";
$body .= "Negotiator Name: ".$NegotiatorName."\n";
$body .= "Site Code: ".$SiteCode."\n";
$body .= "Finance: ".$Finance."\n";
$body .= "Items: ".$Items."\n";
$body .= "Notes: ".$Notes."\n";

$body .= "________________________________________\n\n" ;
mail($to_email,$subject,$body,$headers);
}
?>

Share this post


Link to post
Share on other sites
you can try this ok but remember to make a backup of your own.


<?PHP
if (isset($_POST['send'])) {
$IDNumber = $_POST['IDNumber'];
$NegotiatorName = $_POST['NegotiatorName'];
$SiteCode = $_POST['SiteCode'];
$Notes = $_POST['Notes'];

$to_email="chrisstarkings@elliotsestateagents.co.uk";
$subject="New Sale";
$headers = 'From: $NegotiatorName' . "\r\n" .
  'Reply-To: $email' . "\r\n" .
  'X-Mailer: PHP/' . phpversion();



 
/* message body */
$body = "A new sale has occured, below are all of the details:";
$body .= "________________________________________\n\n" ;
$body .= "From: ".$NegotiatorName.". ".$name." \n";


$body .= "ID Number: ".$IDNumber."\n";
$body .= "Negotiator Name: ".$NegotiatorName."\n";
$body .= "Site Code: ".$SiteCode."\n";
$body .= "Finance: ".$Finance."\n";
$body .= "Items: ".$Items."\n";
$body .= "Notes: ".$Notes."\n";

$body .= "________________________________________\n\n" ;
mail($to_email,$subject,$body,$headers);
}
?>

Share this post


Link to post
Share on other sites
Guest starko
all uploaded but still not working?

Share this post


Link to post
Share on other sites
Guest starko
no, nothing seems to work!!!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.