Jump to content


Form....no emails sent...


  • Please log in to reply
11 replies to this topic

#1 Guest_Starko_*

Guest_Starko_*
  • Guests

Posted 30 June 2006 - 08:06 AM

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?

<?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);
}
?>
<?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>


#2 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 30 June 2006 - 08:28 AM

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

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

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:
$to_email = "Sales Progressors <test@elliotsestateagents.co.uk>";

Orio.
Think you're smarty?

(Gone until 20 to November)

#3 Guest_starko_*

Guest_starko_*
  • Guests

Posted 30 June 2006 - 08:47 AM

It is online at www.elliotsestateagents.co.uk/admin/sale.php and it still doesnt work. any ideas?

#4 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 30 June 2006 - 09:01 AM

Try this:

<?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);
}
?>

Orio.
Think you're smarty?

(Gone until 20 to November)

#5 Guest_starko_*

Guest_starko_*
  • Guests

Posted 30 June 2006 - 09:07 AM

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.

#6 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 30 June 2006 - 09:11 AM


why this not submit?

if (isset($_POST['send'])) {
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#7 Guest_Starko_*

Guest_Starko_*
  • Guests

Posted 30 June 2006 - 09:18 AM

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.

<?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);
}
?>


#8 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 30 June 2006 - 09:31 AM


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);
}
?>
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#9 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 30 June 2006 - 09:42 AM

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);
}
?>
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#10 Guest_starko_*

Guest_starko_*
  • Guests

Posted 30 June 2006 - 11:22 AM

all uploaded but still not working?

#11 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 30 June 2006 - 11:33 AM

Any errors given?

Orio.
Think you're smarty?

(Gone until 20 to November)

#12 Guest_starko_*

Guest_starko_*
  • Guests

Posted 30 June 2006 - 12:20 PM

no, nothing seems to work!!!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users