Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML]Maile wysyłane z bramki email nie są wysyłane., Po wypełenienu formularza na stronie maile nie wysyłane.
mastermindgpo
post
Post #1





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 26.02.2015

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


Witam,
Jeśli chodzi o działanie w html, ostatnim razem bawiłem sie tym w liceum 7lat temu więc przepraszam z góry ejsli moje pytanei wyda sieWam trywialne. Otóż przy próbie wysyłania z bramki email na mojej stronie, maile nie wychodzą. Podobno jest to kwestia jakiś filtrów antyspamowych wprwadzonych przez home.pl jednak nie wiem o tym za dużo. Poniżej wklejam kod, być moze wypatrzycie tutaj błąd.
Kod
<?php

/* Code by David McKeown - craftedbydavid.com */
/* Editable entries are bellow */

$send_to = "kontakt@film.it";
$send_subject = "wiadomość ze strony studio.lajt.it";



/*Be careful when editing below this line */

$f_name = cleanupentries($_POST["name"]);
$f_email = cleanupentries($_POST["email"]);
$f_message = cleanupentries($_POST["message"]);
$from_ip = $_SERVER['REMOTE_ADDR'];
$from_browser = $_SERVER['HTTP_USER_AGENT'];

function cleanupentries($entry) {
    $entry = trim($entry);
    $entry = stripslashes($entry);
    $entry = htmlspecialchars($entry);

    return $entry;
}

$message = "This email was submitted on " . date('m-d-Y') .
"\n\nName: " . $f_name .
"\n\nE-Mail: " . $f_email .
"\n\nMessage: \n" . $f_message .
"\n\n\nTechnical Details:\n" . $from_ip . "\n" . $from_browser;

$send_subject .= " - {$f_name}";

$headers = "From: " . $f_email . "\r\n" .
    "Reply-To: " . $f_email . "\r\n" .
    "X-Mailer: PHP/" . phpversion();

if (!$f_email) {
    echo "no email";
    exit;
}else if (!$f_name){
    echo "no name";
    exit;
}else{
    if (filter_var($f_email, FILTER_VALIDATE_EMAIL)) {
        mail($send_to, $send_subject, $message, $headers);
        echo "true";
    }else{
        echo "invalid email";
        exit;
    }
}

?>


Tutaj jeszcze kod z index
Kod
<!-- CONTACT SECTION
    ================================================== -->
    
        <div id="contact">
            <div class="container">
                <div class="sixteen columns" data-scrollreveal="enter top and move 150px over 1s">    
                    <div class="section-top">    
                        <div class="line-dark"></div>    
                        <h1>kontakt</h1>
                        <div class="subtext-top">napisz do nas</div>
                        <div class="line-dark1"></div>
                    </div>                
                </div>
            </div>
            
            <div class="owl-wrap-contact">
                
                <div id="sync7" class="owl-carousel">
                    <div class="item">
                        <div class="container">
                            <div class="sixteen columns" data-scrollreveal="enter bottom and move 250px over 1s">
                                <form name="ajax-form" id="ajax-form" action="mail-it.php" method="post">
                                    <label for="name">imię: *
                                        <span class="error" id="err-name">podaj swoje imię</span>
                                    </label>
                                    <input name="name" id="name" type="text" />
                                    <label for="email">e-mail: *
                                        <span class="error" id="err-email">podaj adres email</span>
                                        <span class="error" id="err-emailvld">podany adres nie jest poprawny</span>
                                    </label>
                                    <input name="email" id="email" type="text" />
                                    <label for="message">wiadomość:</label>
                                    <textarea name="message" id="message"></textarea>
                                    <button class="send_message" id="send">wyślij</button>
                                    <div class="error" id="err-form">wystąpił problem. Sprawdź ponownie formularz</div>
                                    <div class="error" id="err-timedout">The connection to the server timed out!</div>
                                    <div class="error" id="err-state"></div>
                                </form>
                                <div id="ajaxsuccess">dziękujemy za kontakt</div>        
                            </div>            
                        </div>
                    </div>
                <!--    <div class="item">
                        <div id="map"></div>
                    </div> -->
                    <div class="item">
                        <div class="container">
                            <div class="sixteen columns padding-bottom-contact">


Ten post edytował mastermindgpo 26.02.2015, 02:01:29
Go to the top of the page
+Quote Post

Posty w temacie


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: 5.10.2025 - 00:45