I have a form where someone can send me a message but I do not seem to get the e-mail.
here is the html file:
<!DOCTYPE HTML>
<html>
<head>
<title>Financial E-mail: Send us questions.</title>
<hr/>
<style type="text/css">
body
{
background-color: rgb(98,21,153);;
background-position: top;
background-repeat: no-repeat;
color: gold;
}
a:link {color:rgb(255,215,0);}/* unvisited link */
a:visited {color:rgb(205,215,03);}/* visited link */
a:hover {color:rgb(0,0,0);} /* mouse over link */
a:active {color:rgb(255,255,255);} /* selected link */
.center
{
margin:auto;
width:70%;
}
p.italic {font-style:italic;}
p.oblique {font-style:oblique;}
p.color {color:azure};
</style>
</head>
<body>
<p> Here you can send questions to the website moderator viva e-mail. Any flaws or bugs should be sent to this address:financialmod@yahoo.com</p>
<br/>
<br/>
<form method="post" action="FinancialEmail.php" >
<p>Email Address: <input type="text" name ="email" size="40" /> </p>
<p>Subject: <input type="text" name ="subject" size="20" /> </p>
<p>MessageS:<textarea name='message' rows='15' cols='40'>
</textarea>
</p>
<input type="submit" name ="submit" value="Submit!"/>
</body>
</html>
here is the php file:
<!DOCTYPE HTML>
<html>
<head>
<title>Financial E-mail: Send us questions.</title>
<hr/>
<style type="text/css">
body
{
background-color: rgb(98,21,153);;
background-position: top;
background-repeat: no-repeat;
color: gold;
}
a:link {color:rgb(255,215,0);}/* unvisited link */
a:visited {color:rgb(205,215,03);}/* visited link */
a:hover {color:rgb(0,0,0);} /* mouse over link */
a:active {color:rgb(255,255,255);} /* selected link */
.center
{
margin:auto;
width:70%;
}
p.italic {font-style:italic;}
p.oblique {font-style:oblique;}
p.color {color:azure};
</style>
</head>
<body>
<br/>
<br/>
<?php
$email1 = $_POST['email'];
$subject1 = $_POST['subject'];
$message1 = $_POST['message'];
/*
if ( mail($email, $subject, $message) )
{
echo("Your email message was successfully sent.");
}
else
{
echo("Sorry, message delivery failed. Contact webmaster for more info.");
}
*/
/*
<form method="post" action="contact.php">
Email: <input name="email" type="text"><br>
Message:<br>
<textarea name="message" rows="15" cols="40"></textarea><br>
<input type="submit">
</form>
//<?php
*/
//if(isset(
$message = $message1;
$to = "financialmod@yahoo.com";
$subject = $subject1;
$email = $email1;
$from = '$email1';
$headers = "From: " .$email;
mail($to, $subject, $message, $headers);
echo "Mail Sent.";
/*$message = $_REQUEST['message'] ;
$sent = mail($to, $subject, $message, $headers) ;
if($sent)
{print "Your mail was sent successfully"; }
else
{print "We encountered an error sending your mail"; }
?>
?>
*/
?>
</html>
</body>