Ich habe ein Kontaktformular codiert, aber aus irgendeinem Grund bekomme ich nicht wirklich die E-Mail, aber der PHP-Code hat keine Fehler und das Formular gibt eine Erfolgsmeldung zurück. Ich habe meine E-Mail-Adresse aus dem Code hier entfernt.Kontaktformular - Senden/Empfangen von Problemen
Kontaktformular
<body>
<div class='formbody'>
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<form id="contact-form" action="send.php" method="POST">
<p>Hi</p>
<p>My
<label for="your-name">name</label> is
<input type="text" name="your-name" id="your-name" minlength="3" placeholder="(your name here)" required> and</p>
<p>my
<label for="email">email address</label> is
<input type="email" name="your-email" id="email" placeholder="(your email address)" required>
</p>
<p> I have a
<label for="your-message">message</label> for you,</p>
<p>
<textarea name="your-message" id="your-message" placeholder="(your msg here)" class="expanding" required></textarea>
</p>
<p>
<button type="submit">
<svg version="1.1" class="send-icn" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="100px" height="36px" viewBox="0 0 100 36" enable-background="new 0 0 100 36" xml:space="preserve">
<path d="M100,0L100,0 M23.8,7.1L100,0L40.9,36l-4.7-7.5L22,34.8l-4-11L0,30.5L16.4,8.7l5.4,15L23,7L23.8,7.1z M16.8,20.4l-1.5-4.3
l-5.1,6.7L16.8,20.4z M34.4,25.4l-8.1-13.1L25,29.6L34.4,25.4z M35.2,13.2l8.1,13.1L70,9.9L35.2,13.2z" />
</svg>
<small>SEND PLEASE</small>
</button>
</p>
</form>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/bs-animation.js"></script>
<script src="assets/js/index.js"></script>
</div>
</body>
</html>
send.php
<?php
$page='contactus';
include('header.php');
include('navbar.php');
?>
<?php
$to = 'removed';
$name = TRIM (stripslashes($_POST['your-name']));
$email = TRIM (stripslashes($_POST['your-email']));
$message = TRIM (stripslashes($_POST['your-message']));
$subject = 'Message';
$name = 'Name: ';
$email= 'From:';
$message= 'Message: ';
if(mail($to, $subject, $name , $email , $message)){
echo 'success';
}
else{
print('There has been a small error . Sorry!!');
}
?>
E-Mail-Funktion folgt immer dieser Regel Mail (zu, Betreff, Nachricht, Header, Parameter); –
Ok, nicht ganz sicher, was du meinst.? Können Sie bitte erläutern? – Bill04