Jump to content

PHP Form not sending to email?


euphoriastudio

Recommended Posts

Can someone take a look at my code and tell me what I'm doing wrong? From the visitors view, its working. But it doesn't actually send the info to my email. Thanks for the help!

 

 

HTML Code:

<html>
<head>
<title>Analysis</title>
</head>
<body>
<form method="post" action="sendmail.php">
Name:<input type="text" size="12" maxlength="12" name="name"><br />
Full Address:<input type="text" size="12" maxlength="100" name="address"><br />
Phone:<input type="text" size="12" maxlength="14" name="phone"><br />

Estimated value of home (Appraisal or tax value):<input type="text" size="12" maxlength="100" name="estvalue"><br />

Original loan balance: <input type="text" size="12" maxlength="100" name="orgbal"><br />

Current loan balance: <input type="text" size="12" maxlength="100" name="currbal"><br />

Type of loan:<br>
( fixed, variable, arm, interest only, neg am?) <input type="text" size="12" maxlength="100" name="loantype"><br />

Original Term: (How many years) <input type="text" size="12" maxlength="100" name="orgterm"><br />

Remaining Term: <input type="text" size="12" maxlength="100" name="remainingterm"><br />

Rate of mortgage: <input type="text" size="12" maxlength="100" name="ROM"><br />

Full Monthly Payment: <input type="text" size="12" maxlength="100" name="FMP"><br />

Amount to Escrow: <input type="text" size="12" maxlength="100" name="AtoE"><br />

2nd Mortgage Original balance if applicable: <input type="text" size="12" maxlength="100" name="MorBal2"><br />

Current 2nd balance: <input type="text" size="12" maxlength="100" name="Curr2ndBal"><br />

Type of mortgage: <input type="text" size="12" maxlength="100" name="ToM2"><br />

Term: <input type="text" size="12" maxlength="100" name="Term2"><br />

Remaining Term: <input type="text" size="12" maxlength="100" name="RemainingTerm2"><br />

Rate: <input type="text" size="12" maxlength="100" name="Rate2"><br />

Full Payment: <input type="text" size="12" maxlength="100" name="FMP2"><br />

Other debts to be paid off. 
If applicable what is the interest rate, term, and monthly payment?:<br><textarea rows="12" cols="20" name="otherdebts" wrap="physical">(ie: Credit cards, car loans, loans)</textarea><br />

Monthly Net Income:<br>
  (If commission give average amount per month) <input type="text" size="12" maxlength="100" name="MNI"><br />

Type of Income:<br />
<select name="incometype">
<option value="weekly">Weekly</option>
<option value="biweekly">Bi-Weekly</option>
<option value="monthly">Monthly</option>
<option value="semimonthly">Semi-Monthly</option</select><br />

Spouses Monthly Net Income if applicable: <input type="text" size="12" maxlength="100" name="SpouseMNI"><br />

Spouses Type of Income: <br />
<select name="incometypespouse">
<option value="weekly">Weekly</option>
<option value="biweekly">Bi-Weekly</option>
<option value="monthly">Monthly</option>
<option value="semimonthly">Semi-Monthly</option</select><br />

How much money is left at the end of the month after life happens?: <input type="text" size="12" maxlength="100" name="moneyleft"><br />

<input type="submit" value="submit" name="submit"><br />
</form><br />
</body>
</html>

 

PHP Code:

<?php
$name = $_REQUEST["name"];
$address = $_REQUEST["address"];
$phone = $_REQUEST["phone"];
$estvalue = $_REQUEST["estvalue"];
$orgbal = $_REQUEST["orgbal"];
$currbal = $_REQUEST["currbal"];
$loantype = $_REQUEST["loantype"];
$orgterm = $_REQUEST["orgterm"];
$remainingterm = $_REQUEST["remainingterm"];
$ROM = $_REQUEST["ROM"];
$FMP = $_REQUEST["FMP"];
$AtoE = $_REQUEST["AtoE"];
$MorBal2 = $_REQUEST["MorBal2"];
$Curr2ndBal = $_REQUEST["Curr2ndBal"];
$ToM2 = $_REQUEST["ToM2"];
$Term2 = $_REQUEST["Term2"];
$RemainingTerm2 = $_REQUEST["RemainingTerm2"];
$Rate2 = $_REQUEST["Rate2"];
$FMP2 = $_REQUEST["FMP2"];
$otherdebts = $_REQUEST["otherdebts"];
$MNI = $_REQUEST["MNI"];
$incometype = $_REQUEST["incometype"];
$SpouseMNI = $_REQUEST["SpouseMNI"];
$incometypespouse = $_REQUEST["incometypespouse"];
$moneyleft = $_REQUEST["moneyleft"];
$embody = "$name $address $phone $estvalue $orgbal $currbal $loantype $orgterm $remainingterm $ROM $FMP $AtoE $MorBal2 $Curr2ndBal $ToM2 $Term2 $RemainingTerm2 $Rate2 $FMP2 $otherdebts $MNI $incometype $SpouseMNI $incometypespouse $moneyleft";

  mail( "euphoria.studio@gmail.com", "Analysis Request", $embody, "From: $name" );
  header( "Location: http://formtest.freehostia.com/analysis.html" );
?> 

Link to comment
Share on other sites

Try using a valid email from the same domain for your your From header, and add a die to see if the server is blocking your command, or the email is being sent to no mans land:

 

mail("euphoria.studio@gmail.com", "Analysis Request", $embody, "From: info@domainname.com" )
  or die("Can't send email");

 

 

...also, check your spam filter...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.