Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in F:\wamp\www\sidan\Tips_form.php on line 23
When i try to use my email contact thing this shows up ^
<?php
error_reporting (E_ALL ^ E_NOTICE);
if ($_POST['parse_var'] == "Tipsform"){
$emailTitle = 'Tips från randomstuff!';
$youremail = 'Randomstufftips@hotmail.com';
$lankField = $_POST['lank'];
$emailField = $_POST['email'];
$beskrivningField = $_POST['beskrivning'];
$body = <<<EOD
<br><hr><br>
Email: $lankField <br />
Länk: $lankField <br />
Beskrivning: $beskrivningField <br />
EOD;
$headers = "From:$emailField\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail("$youremail", "$emailTitl", "$body", "$headers");
$sent = "Ditt tips har skickats,Tackar:)";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<table width="400" border="1" cellpadding="0" align="center">
<tr>
<td align="center">Om du vill tipsa så fyll i under<br /><br />
<form id="Tipsa" name="Tipsa" method="post" action="Tips_form.php">
<table width="100%" border="0" cellpadding="3">
<tr bgcolor="#CCCCCC">
<td width="24%" align="right">Länk:</td>
<td width="76%" align="left"><label for="namn"></label>
<input type="text" name="namn" id="namn" maxlength="70" size="50" value="<?php print "$lankField"; ?>"/></td>
</tr>
<tr>
<td align="right">Email:</td>
<td align="left"><label for="email"></label>
<input type="text" name="email" id="email" maxlength="50" size="50" value="<?php print "$emailField"; ?>"/></td>
</tr>
<tr bgcolor="#CCCCCC">
<td align="right">Beskrivning</td>
<td><label for="message"></label>
<textarea name="message" id="message" cols="40" rows="5"><?php print "$beskrivningField"; ?></textarea></td>
</tr>
<tr>
<td> </td>
<td align="right"><input type="reset" name="reset" id="reset" value="Töm" />
<input type="hidden" name="parse_var" id="parse_var" value="Tipsform" /> <input type="submit" name="submit" id="submit" value="Tipsa" /></td>
</tr>
<tr>
<td colspan="2"><?php print "$beskrivningField"; ?></td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>