Email problem
Posted: Sun Apr 24, 2011 12:10 pm
Hi,
I am using this code to sent an email.
There are 2 things happening when I get the email the body is missing in the email i get a blank email
Secondly the emails are coming slow means it takes 4 hrs to receive an email
any help is highly appreciated
todd
I am using this code to sent an email.
There are 2 things happening when I get the email the body is missing in the email i get a blank email
Secondly the emails are coming slow means it takes 4 hrs to receive an email
any help is highly appreciated
todd
Code: Select all
$body = "<p><b>Personal Information</b></p>
<p>Name: $txtname <br/>
Email: $email
</p>
<p><b>Sellers Information</b></p>
<p>Name: $txtsellersname <br/>
Address: $txtaddress
</p>
<p><b>Property Information</b></p>
<p>Closing Date: $txtclosingdate <br/>
Sales Price: $$sales <br/>
First Lien Payoff: $$txtfirstlien <br/>
Second Lien Payoff: $$txtsecondlienoff <br/>
Previous Years Tax Due: $$txtprevyearstaxdue <br/>
Annual Property Taxes: $$txtannualproperttax<br/>
Real Estate Closing Fee: $$txtrealestateclosingfee<br/>
Courier/Wire Fee: $$txtcourierfee <br/>
Tax Certificate: $$txttaxcertificates<br/>
HOA Statement Fee: $$txthoastatementfee<br/>
HOA Dues: $$txthoadues <br/>
Title Insurance: $$txttitleinsurance <br/>
Commission: $txtcommission <br/>
Stormwater: $$txtStormwater <br/>
Buyer Paid Closing Cost: $$txtbuyerpaidclosing <br/>
Home Warranty: $$txthomewarranty <br/>
Repairs: $$txtrepairs <br/>
Owners Extended Coverage: $$ownerexcoverage<br/>
Other: $$txtother <br/>
</p>
";
$from ="toddc@hotmail.com";
$to = $email;
$from = $from;
$name = $txtname ;
$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
$body = $_REQUEST['body'] ;
$subject = "Report";
if($from == '') {print "You have not entered an email, please go back and try again";}
else {
if($name == '') {print "You have not entered a name, please go back and try again";}
else {
$send = mail($to, $subject, $body, $headers);
if($send)
{print("<br/><br/><p>Email Confirmation has been sent to your email address.</p>");}
else
{print "We encountered an error sending your mail, please notify your IT Department"; }
}
}