Kod
<form action="skrypt.php" method="post">
<input type="text" name="email" /><br />
<input type="text" name="nazwisko" /><br />
<textarea name="content" cols="30" rows="6"></textarea>
<input type="submit" value="wyślij" />
</form>
<input type="text" name="email" /><br />
<input type="text" name="nazwisko" /><br />
<textarea name="content" cols="30" rows="6"></textarea>
<input type="submit" value="wyślij" />
</form>
skrypt.php:
Kod
<?
$adresat = 'nazwa@vp.pl';
@$content = "<b>Imie:</b>".$_POST['content']."<br>".$_POST['nazwisko'];
@$from = $_POST[nazwisko].' <'.$_POST[email].'>';
$replyTo = $from;
$header .= "Content-type: text/html; charset=iso-8859-2\n";
$header .= "Content-Transfer-Encoding: charset=iso-8859-2";
$header .= "From: ".$from."\r\n";
$header .= "Reply-to: $from\r\n";
$header .= "Mime-Version: 1.0\r\n";
if (mail($adresat, $email, $content, $header))
echo '<p>działa</p>';
else
echo '<p><b>NIE</b> wysłano maila!</p>';
?>
$adresat = 'nazwa@vp.pl';
@$content = "<b>Imie:</b>".$_POST['content']."<br>".$_POST['nazwisko'];
@$from = $_POST[nazwisko].' <'.$_POST[email].'>';
$replyTo = $from;
$header .= "Content-type: text/html; charset=iso-8859-2\n";
$header .= "Content-Transfer-Encoding: charset=iso-8859-2";
$header .= "From: ".$from."\r\n";
$header .= "Reply-to: $from\r\n";
$header .= "Mime-Version: 1.0\r\n";
if (mail($adresat, $email, $content, $header))
echo '<p>działa</p>';
else
echo '<p><b>NIE</b> wysłano maila!</p>';
?>
Problem polega na tym, że w kliencie pocztowym jako odbiorca wyświetla się "nobody" zamiast adresu maila wpisanego w formularzu. Bardzo prosze o pomoc.