Einchecken des Online-Codes
This commit is contained in:
76
inhalte/kontakt/senden.php
Normal file
76
inhalte/kontakt/senden.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<a href="index.php?section=kontakt&topic=nachricht" class="back"></a>
|
||||
|
||||
<h1>Nehmen Sie mit uns Kontakt auf!</h1>
|
||||
|
||||
<?php
|
||||
|
||||
error_reporting(0);
|
||||
|
||||
// *** Deine Mailadresse (Empfänger) ***
|
||||
$mail_to="info@ri-st.de";
|
||||
// *************************************
|
||||
|
||||
$from_name=$_POST['Anrede']." ".$_POST['Vorname']." ".$_POST['Nachname'];
|
||||
$from_mail=strtolower($_POST['EMail']);
|
||||
$mail_text=$_POST['Nachricht'];
|
||||
$send=$_POST['s'];
|
||||
|
||||
if ('' == trim($from_name)) {
|
||||
$err_text.="Bitte den Namen angeben!<br />";
|
||||
}
|
||||
if ('' == trim($from_mail)) {
|
||||
$err_text.="Bitte die E-Mail-Adresse angeben!<br />";
|
||||
}
|
||||
if (!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})$",$from_mail)) {
|
||||
$err_text.="Bitte eine gültige E-Mail-Adresse angeben.<br />";
|
||||
}
|
||||
if ('' == trim($mail_text)) {
|
||||
$err_text.="Bitte einen Nachrichtentext eingeben.<br />";
|
||||
}
|
||||
|
||||
$from_name=str_replace(chr(34),"''",$from_name);
|
||||
$from_name=stripslashes($from_name);
|
||||
$from_mail=stripslashes($from_mail);
|
||||
$mail_text=stripslashes($mail_text);
|
||||
$mail_subject="Kontakt zu R!ST";
|
||||
|
||||
|
||||
if (isset($err_text)) {
|
||||
echo "<p><big><b>Fehler:</b></big><br>";
|
||||
echo "$err_text</p>";
|
||||
} else {
|
||||
$header="From: $from_name <$from_mail>\n";
|
||||
$header.="Reply-To: $from_mail\n";
|
||||
$header.="Mailer: PHP-Mailer (www.huber-putz.com)\n";
|
||||
$header.="Content-Type: text/plain";
|
||||
$mail_date=gmdate("D, d M Y H:i:s")." +0001";
|
||||
$mail_date2=date("d.m.Y H:i");
|
||||
$send=0;
|
||||
if (@mail($mail_to,$mail_subject,$mail_text,$header)) {
|
||||
echo "<h2>Folgende Nachricht wurde am $mail_date2 verschickt:</h2>\n";
|
||||
echo "<table>\n";
|
||||
echo "<colgroup>\n";
|
||||
echo "<col width=\"150\" />\n";
|
||||
echo "<col width=\"450\" />\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td>Von:</td>\n";
|
||||
echo "<td>$from_name</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td>Betreff:</td>\n";
|
||||
echo "<td>$mail_subject</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td>Ihre Nachricht:</td>\n";
|
||||
echo "<td>".nl2br($mail_text)."</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>\n";
|
||||
}
|
||||
else {
|
||||
echo "<p><b>Beim Versenden der E-Mail ist ein Fehler aufgetreten!</b></p>";
|
||||
echo "<p><a href=\"index.php?section=kontakt&topic=nachricht\">Zurück zum Formular</a></p>";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user