# DESPERATE need of help for PHP Mailer

**URL:** https://forum.kirupa.com/t/desperate-need-of-help-for-php-mailer/226519
**Category:** programming
**Created:** [May 22, 2007, 2:30am UTC](https://forum.kirupa.com/t/desperate-need-of-help-for-php-mailer/226519 "2007-05-22T02:30:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lacluna](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@lacluna](https://forum.kirupa.com/u/lacluna)
#### Post date: [May 22, 2007, 2:30am UTC](https://forum.kirupa.com/t/desperate-need-of-help-for-php-mailer/226519/1 "2007-05-22T02:30:00Z")

</div>

I have to files: index.html and mailer.php The codes are below. Can anybody please tell me what’s wrong with them? Why can’t I receive the email with the postings!!! Please help, I’m going crazy.

INDEX.HTML  
\<form method=“POST” action=“mailer.php”\>  
First Name:  
\<input type=“text” name=“name” size=“10”\>\</input\>  
M.I.:  
\<input type=“text” name=“name” size=“2”\>\</input\>  
Last Name:  
\<input type=“text” name=“name” size=“10”\>\</input\> \<br /\>  
Address:  
\<input type=“text” name=“email” size=“29”\>\</input\>\<br /\>  
City:  
\<input type=“text” name=“name” size=“10”\>\</input\>  
State:  
\<input type=“text” name=“name” size=“2”\>\</input\>  
Zip Code:  
\<input type=“text” name=“name” size=“5”\>\</input\>  
\<br /\>  
Home Phone #:  
\<input type=“text” name=“name” size=“13”\>\</input\>\<br /\>  
Work phone #:  
\<input type=“text” name=“name” size=“13”\>\</input\>\<br /\>  
Cell phone #:  
\<input type=“text” name=“name” size=“13”\>\</input\>\<br /\>  
Best time to call:  
\<input type=“text” name=“name” size=“13”\>\</input\>\<br /\>  
E-mail address:  
\<input type=“text” name=“name” size=“29”\>\</input\>\<br /\>  
Purpose of the Loan \<select size=“1” name=“drop\_down”\>  
\<option\>Please Select \</option\>  
\<option\>purchase\</option\>  
\<option\>refinance\</option\>  
\<option\>remodeling\</option\>  
\</select\>\<br /\>  
Property Value: $  
\<input type=“text” name=“name” size=“13”\>\</input\>\<br /\>  
Loan Amount you’re applying for: $  
\<input type=“text” name=“name” size=“13”\>\</input\> or % down payment\<input type=“text” name=“name” size=“13”\>\</input\>\<br /\>  
Do you have a co-borrower?  
\<input type=“radio” value=“yes” name=“radio”\>\</input\> YES  
\<input type=“radio” value=“no” name=“radio”\>\</input\> NO  
\<br /\>  
In which state are you looking for a loan?:  
\<input type=“text” name=“name” size=“2”\>\</input\>  
\<br /\>  
Do you currently own any real state?  
\<input type=“radio” value=“no” name=“radio”\>\</input\> NO  
\<input type=“radio” value=“yes” name=“radio”\>\</input\> YES, I own \<input type=“text” name=“name” size=“3”\>\</input\> properties \<br /\>  
How is your credit?:\<br /\>  
\<input type=“radio” value=“Excellent” name=“radio”\>\</input\> Excellent\<br /\>  
\<input type=“radio” value=“Ok, but some problems” name=“radio”\>\</input\> Ok, but some problems\<br /\>  
\<input type=“radio” value=“Major Credit problems” name=“radio”\>\</input\> Major Credit problems\<br /\>  
\<input type=“radio” value=“Don’t know” name=“radio”\>\</input\> Don’t know\<br /\>  
\<br /\>  
Questions:\<br /\>  
\<textarea rows=“9” name=“message” cols=“30”\>\</textarea\>\<br /\>  
\<br /\>  
\<input type=“submit” value=“Submit” name=“submit”\>\</input\>  
\</form\>

MAILER.PHP:  
\<?PHP  
$to = "lacluna@yahoo.com";  
$subject = “Results from your Request Info form”;  
$headers = “From: Form Mailer”;  
$forward = 1;  
$location = “http;[//www.mortgagelendingstore.com](https://www.mortgagelendingstore.com)”;

$date = date (“l, F jS, Y”);  
$time = date (“h:i A”);

$msg = "Below is the result of your feedback form. It was submitted on $date at $time.

";

if ($\_SERVER[‘REQUEST\_METHOD’] == “POST”) {  
foreach ($\_POST as $key =\> $value) {  
$msg .= ucfirst ($key) ." : ". $value . "  
“;  
}  
}  
else {  
foreach ($\_GET as $key =\> $value) {  
$msg .= ucfirst ($key) .” : ". $value . "  
";  
}  
}

mail($to, $subject, $msg, $headers);  
if ($forward == 1) {  
header (“Location:$location”);  
}  
else {  
echo “Thank you for submitting our form. We will get back to you as soon as possible.”;  
}

?\>
