Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][PHP]Wysyłanie e-maili / formularz kontaktowy
Mumineks
post
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 19.12.2015

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


Witam serdecznie, jako nowy na forum. wink.gif

Mój problem jest następujący: wiadomości wpisane za pomocą formularza kontaktowego na stronie nie dochodzą do mnie.

HTML:

Kod
<div class="col-md-4 col-sm-12">
                    <div class="contact-form bottom">
                        <h2>WYŚLIJ WIADOMOŚĆ</h2>
                        <form id="main-contact-form" name="contact-form" method="post" action="sendemail.php">
                            <div class="form-group">
                                <input type="text" name="name" class="form-control" required="required" placeholder="Twoje imie">
                            </div>
                            <div class="form-group">
                                <input type="email" name="email" class="form-control" required="required" placeholder="Twój e-mail">
                            </div>
                            <div class="form-group">
                                <textarea name="message" id="message" required="required" class="form-control" rows="8" placeholder="Wpisz wiadomość..."></textarea>
                            </div>                        
                            <div class="form-group">
                                <input type="submit" name="submit" class="btn btn-submit" value="WYŚLIJ">
                            </div>
                        </form>
                    </div>
                </div>


i plik .php:

Kod
<?php
$name       = @trim(stripslashes($_POST['name']));
$from       = @trim(stripslashes($_POST['email']));
$subject    = @trim(stripslashes($_POST['subject']));
$message    = @trim(stripslashes($_POST['message']));
$to           = 'MÓJ@EMAIL.COM';//replace with your email

$headers   = array();
$headers[] = "MIME-Version: 1.0";
$headers[] = "Content-type: text/plain; charset=iso-8859-1";
$headers[] = "From: {$name} <{$from}>";
$headers[] = "Reply-To: <{$from}>";
$headers[] = "Subject: {$subject}";
$headers[] = "X-Mailer: PHP/".phpversion();

mail($to, $subject, $message, $headers);

die;


Czy ktoś wie o co może chodzić? Chmody ustawione na 777 na oba pliki (index.php i sendemail.php)

Pozdrawiam i dziękuję za cierpliwość.

Ten post edytował Mumineks 19.12.2015, 21:32:23
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
darko
post
Post #2





Grupa: Zarejestrowani
Postów: 2 885
Pomógł: 463
Dołączył: 3.10.2009
Skąd: Wrocław

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


Ustaw w skrypcie php raportowanie błędów:


--------------------
Nie pomagam na pw, tylko forum.
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: 19.08.2025 - 05:03