Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Problem z funkcją mail(), Problem z funkcją mail()
boradek
post
Post #1





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 17.01.2010

Ostrzeżenie: (0%)
-----


w html mam formularz:
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>


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>';
?>


Problem polega na tym, że w kliencie pocztowym jako odbiorca wyświetla się "nobody" zamiast adresu maila wpisanego w formularzu. Bardzo prosze o pomoc.
Go to the top of the page
+Quote Post
DiH
post
Post #2





Grupa: Zarejestrowani
Postów: 251
Pomógł: 34
Dołączył: 7.01.2010

Ostrzeżenie: (0%)
-----


http://php.net/manual/pl/function.mail.php -> Notatki
Go to the top of the page
+Quote Post
k0b3
post
Post #3





Grupa: Zarejestrowani
Postów: 138
Pomógł: 0
Dołączył: 1.08.2006
Skąd: Kielce

Ostrzeżenie: (0%)
-----


Polecam korzystać z klasy PHPMailer
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 11:16